Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
It's not valid to simplify FLOOR(CEIL(x)) to FLOOR(x).
Specifically, it is not valid to simplify FLOOR(CEIL(x TO YEAR) TO YEAR) to FLOOR(x TO YEAR) when x is TIMESTAMP '2010-10-10 00:00:00'. I believe the correct simplification is CEIL(x TO YEAR).
I have disabled RexImplicationCheckerTest.testSimplifyFloor due to this issue. Please re-enable it as part of the fix for this bug.
Attachments
Issue Links
- is related to
-
CALCITE-2314 Verify RexNode transformations by evaluating before and after expressions against sample values
- Closed
- relates to
-
CALCITE-2334 Extend simplification of expressions with CEIL function over date types
- Closed