Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Implemented
-
None
Description
This issue aims to convert IN/EXISTS to semi-join, and NOT IN/NOT EXISTS to anti-join.
In Calcite, SemiJoin only represents semi-join, (could not represent anti-join) and requires equi join condition. Queries like `select * from left where left.a1 in (select right.a2 from right where left.b1 > right.b2)` and `select * from left where not exists (select * from right)` could not be converted to Calcite SemiJoin operator.
To solve the above problem, We need copy the SemiJoin class to Flink, and make the following changes:
1. make SemiJoin extending from Join, not from EquiJoin. (to support non-equi join condition)
2. add isAnti field attribute to represent anti-join.
Currently, there are no rules to convert (NOT) IN/ (NOT) EXISTS to SemiJoin, so we need a whole new rule (named FlinkSubQueryRemoveRule) to meet our requirement.
Attachments
Issue Links
- is a child of
-
FLINK-11488 Add a basic Blink planner framework
- Closed
- relates to
-
FLINK-11841 Introduce FlinkLogicalSemiJoin
- Closed
- links to