You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Caizhi Weng (Jira)" <ji...@apache.org> on 2020/10/26 13:15:00 UTC

[jira] [Created] (FLINK-19811) FlinkRexUtil#simplify should simplify search in conjunctions

Caizhi Weng created FLINK-19811:
-----------------------------------

             Summary: FlinkRexUtil#simplify should simplify search in conjunctions
                 Key: FLINK-19811
                 URL: https://issues.apache.org/jira/browse/FLINK-19811
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Planner
            Reporter: Caizhi Weng
             Fix For: 1.12.0


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)}}.

We can expand the {{SEARCH}} rex calls in {{FlinkRexUtil#simplify}} to achieve this. {{RexSimplify#simplify}} in Calcite will do the rest of the work.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)