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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Shang Yuanchun (Jira)
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)