Class TransformExistsApplyToCorrelatedJoin
java.lang.Object
io.trino.sql.planner.iterative.rule.TransformExistsApplyToCorrelatedJoin
EXISTS is modeled as (if correlated predicates are equality comparisons):
- Project(exists := COALESCE(subqueryTrue, false))
- CorrelatedJoin(LEFT)
- input
- Project(subqueryTrue := true)
- Limit(count=1)
- subquery
or:
- CorrelatedJoin(LEFT)
- input
- Project($0 > 0)
- Aggregation(COUNT(*))
- subquery
otherwise-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ApplyNode parent, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.