Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-19811

FlinkRexUtil#simplify should simplify search in conjunctions

Details

    Description

      The new version of Calcite introduces the SEARCH rex call to express range conditions. However SEARCH}}s in conjunctions are currently not simplified. For example, {{AND(=($2, 2020), SEARCH($2, Sarg[2020, 2021])) is not simplified while it should be simplified to =($2, 2020).

      This issue is caused by CALCITE-4364. We could currently extend the RexSimplify class to temporarily cover this issue.

      Attachments

        Issue Links

          Activity

            xinchen147 Xin Chen added a comment -

            godfreyhe Thank you for above descriptions! But I currently hava a question about "simplify”. Simplification seem to not take into account that the specified field is of array type. In other words,it can simplify "a = 1 AND a = 2" to "false",but can not simplify “a = [1,2] AND a = [2,3]” to "false". Obviously, was there no consideration given to the field type being an array?I found this issue while debugging the Flink SQL task.
            Link to https://issues.apache.org/jira/browse/FLINK-32188.
            Thank you for answer!

            xinchen147 Xin Chen added a comment - godfreyhe Thank you for above descriptions! But I currently hava a question about "simplify”. Simplification seem to not take into account that the specified field is of array type. In other words,it can simplify "a = 1 AND a = 2" to "false",but can not simplify “a = [1,2] AND a = [2,3] ” to "false". Obviously, was there no consideration given to the field type being an array?I found this issue while debugging the Flink SQL task. Link to https://issues.apache.org/jira/browse/FLINK-32188 . Thank you for answer!
            godfreyhe godfrey he added a comment -

            master: 23349b60294600b072f43ad8bd0228516cbfad70

            godfreyhe godfrey he added a comment - master: 23349b60294600b072f43ad8bd0228516cbfad70

            People

              godfreyhe godfrey he
              TsReaper Caizhi Weng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: