Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
SQL Calcite: Added arithmetic overflow handling
Description
Currently, we silently ignore arithmetic overflows and return the wrong result, for example:
SELECT 2147483647 + 2147483647
Returns -2. But SQL standard says that exception should be thrown:
5) If the most specific type of the result of an arithmetic operation is exact numeric, then Case: a) If the operator is not division and the mathematical result of the operation is not exactly representable with the precision and scale of the result data type, then an exception condition is raised: data exception — numeric value out of range.
Attachments
Issue Links
- is duplicated by
-
IGNITE-18175 SQL: value out of type bounds is converted into 0 during implicit casting
- Resolved
- is part of
-
IGNITE-18662 Sql. Numeric to/from decimal cast with overflow does not produce an error
- Resolved
-
IGNITE-12248 Apache Calcite based query execution engine
- Open
- links to
(2 links to)