Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.36.0
Description
The following SqlOperatorTest fails:
f.checkScalar("CAST(1.123 AS DECIMAL(4, 0))", "1.0", "DECIMAL(4, 0) NOT NULL");
The result computed by Calcite is 1.123, ignoring the scale of the DECIMAL result.
Spark, Postgres, MySQL all return 1.0.
I have marked this as a major bug.
Attachments
Issue Links
- causes
-
IGNITE-22519 Sql. Numerics. Conversion produces incorrect results
- Resolved
- contains
-
CALCITE-5860 Decimal type conversion missing scale
- Open
-
CALCITE-6073 Documentation does not specify CAST behavior
- Closed
- is duplicated by
-
CALCITE-6078 Explicit cast to DECIMAL types do not check for overflow
- Closed
- relates to
-
CALCITE-6328 The BigQuery functions SAFE_* do not match the BigQuery specification
- Open
-
CALCITE-6324 Type inferred for result of STDDEV, VAR_SAMP, etc. is incorrect
- Closed
- links to