Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
the sql is following:
// code placeholder select cast(1.1 as int) = cast (1 as int)
In SQLite the result is 1 and in postgreSQL the result is true.
But in calcite the result is false.
The bug is in RexSimplify and 1.1 and 1 are all converted to java.lang.Comparable, and 1.1 doesn't equal to 1. It ignores the source data type. The literal 1.1 should be cast to 1(int) first.
Attachments
Issue Links
- is related to
-
CALCITE-4838 Add RoundingMode in RelDataTypeSystem to specify the rounding behavior
- Closed
- links to