partiql / partiql-lang-kotlin

PartiQL libraries and tools in Kotlin.
https://partiql.org/
Apache License 2.0
539 stars 61 forks source link

Make Int and Decimal precision configurable #220

Open therapon opened 4 years ago

therapon commented 4 years ago

Ion has arbitrary precision for Int and Decimal however this may not be practical for some clients as some queries can be written to consume large quantities of memory, e.g. cast(1e300000000 as int)

A configurable way of defining max precision/scale for Int and Decimal, Ion Floats are already limited by the spec. The minimum allowed precision should be int64

Defaults to UNLIMITED so the default is following the Ion spec

Note Could be one of the options in CompilationOptions

raganhan commented 4 years ago

Changing to Large since it requires a reasonable sized refactor to be implemented