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(1, 3)) - fail
cast(0.012 as DECIMAL(2, 5)) - fail


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 <scale> of an <exact numeric type> shall not be greater than

            the <precision> of the <exact numeric type>.


Thank you,

Mihai

Reply via email to