Re: DECIMAL(2, 3) meaning

2023-08-11 Thread Stamatis Zampetakis
t; fifth digit after the decimal point. > >> > >> Let me ask a related question: in my backend I want to reject such > >> numbers. What is the right way to do it? > >> Should this be done in a SqlShuttle? Or should some Validator class be > >> extended? &g

Re: DECIMAL(2, 3) meaning

2023-08-08 Thread stanilovsky evgeny
essage- From: Julian Hyde Sent: Sunday, August 06, 2023 2:19 PM To: dev@calcite.apache.org Subject: Re: DECIMAL(2, 3) meaning As I commented in https://issues.apache.org/jira/browse/CALCITE-5901, I don’t think it’s a bug to support behavior beyond what the standard requires. Which Calcit

Re: DECIMAL(2, 3) meaning

2023-08-08 Thread Stamatis Zampetakis
From: Julian Hyde > Sent: Sunday, August 06, 2023 2:19 PM > To: dev@calcite.apache.org > Subject: Re: DECIMAL(2, 3) meaning > > As I commented in https://issues.apache.org/jira/browse/CALCITE-5901, I don’t > think it’s a bug to support behavior beyond what the standard requ

RE: DECIMAL(2, 3) meaning

2023-08-06 Thread mbudiu
age- From: Julian Hyde Sent: Sunday, August 06, 2023 2:19 PM To: dev@calcite.apache.org Subject: Re: DECIMAL(2, 3) meaning As I commented in https://issues.apache.org/jira/browse/CALCITE-5901, I don’t think it’s a bug to support behavior beyond what the standard requires. Which Calcit

Re: DECIMAL(2, 3) meaning

2023-08-06 Thread Julian Hyde
s why I am asking. It should fail, but it doesn't. >> >> Mihai >> >> -Original Message- >> From: stanilovsky evgeny >> Sent: Friday, August 04, 2023 7:00 AM >> To: dev@calcite.apache.org >> Subject: Re: DECIMAL(2, 3) meaning >> >>

Re: DECIMAL(2, 3) meaning

2023-08-06 Thread stanilovsky evgeny
ail, but it doesn't. Mihai -Original Message- From: stanilovsky evgeny Sent: Friday, August 04, 2023 7:00 AM To: dev@calcite.apache.org Subject: Re: DECIMAL(2, 3) meaning Hello Mihai. A bit older standard describes Precision as : Precision of decimal floating-point values is a

Re: DECIMAL(2, 3) meaning

2023-08-04 Thread Ran Tao
hi, mbudiu. thanks for opening this discussion. I have checked the sql 1999. it also has this limit. 20)The of an shall not be greater than the of the . 6.1 (page125) however, I think calcite allow scale can be greater than precision, probably considering 'e' notation. for

RE: DECIMAL(2, 3) meaning

2023-08-04 Thread mbudiu
From: stanilovsky evgeny Sent: Friday, August 04, 2023 7:00 AM To: dev@calcite.apache.org Subject: Re: DECIMAL(2, 3) meaning Hello Mihai. A bit older standard describes Precision as : Precision of decimal floating-point values is a positive value that specifies the number of significant decimal

Re: DECIMAL(2, 3) meaning

2023-08-04 Thread stanilovsky evgeny
Hello Mihai. A bit older standard describes Precision as : Precision of decimal floating-point values is a positive value that specifies the number of significant decimal digits in the mantissa. Thus: cast(0.012 as DECIMAL(3, 3)) - ok cast(0.012 as DECIMAL(2, 3)) - fail cast(0.012 as

DECIMAL(2, 3) meaning

2023-08-03 Thread mbudiu
Hello, I notice that Calcite happily accepts decimal type specifications where the scale is greater than the precision. There are quite a few tests with such types. What is the meaning of such types? The SQL 92 standard has this statement on page 109: 15)The of an shall not be