You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/05/29 03:17:00 UTC

[jira] [Created] (CALCITE-2332) It's wrong to simplify FLOOR(CEIL(x)) to FLOOR(x)

Julian Hyde created CALCITE-2332:
------------------------------------

             Summary: It's wrong to simplify FLOOR(CEIL(x)) to FLOOR(x)
                 Key: CALCITE-2332
                 URL: https://issues.apache.org/jira/browse/CALCITE-2332
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


It's wrong 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)