Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Casts from numeric type to decimal with overflow must fail but they return a result:
SELECT 10000000::BIGINT::DECIMAL(3,1)
Returns
---- 1000000
And the following query:
SELECT 2147483648::DECIMAL(18,0)::INTEGER
----
-2147483648
# Integer.MIN_VALUE
query I
SELECT 128::DECIMAL(3,0)::TINYINT
----
-128
# Byte.MIN_VALUE
See skipif-ed examples in cast_to_decimal.test and cast_from_decimal.test
Attachments
Issue Links
- incorporates
-
IGNITE-20849 Sql. Incorrect result returns from CAST as DECIMAL
- Open
-
IGNITE-16181 Calcite engine. Handle arithmetic overflows
- Resolved
- is cloned by
-
IGNITE-20784 Sql. Derive correct type for numbers manipulations operations.
- Resolved
- is related to
-
IGNITE-23407 Calcite. No overflow of numeric cast.
- Open
- links to