Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2332

Wrong simplification of FLOOR(CEIL(x)) to FLOOR(x)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.17.0
    • 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

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: