Postgres’ numeric and decimal types store arbitrary numbers of digits (left and 
right of the point). We could implement something similar in Calcite (a 
reasonable implementation would convert the decimal values to strings like 
“123.45” and “-.0678”, and numeric values to strings in another base).

Then your requirement would be a check constraint: make sure there are no more 
than N digits after the point (where N is an integer constant for a particular 
column).


> On Mar 17, 2025, at 11:56 AM, Ian Bertolacci 
> <[email protected]> wrote:
> 
> Thinking about it some more, it may be more accurate to ask if it is possible 
> to have an infinite max scale/precision.
> We may care about the type’s scale and/or precision, but we do not 
> necessarily need or want to define an upper bound on what they can be.
> 
> -Ian

Reply via email to