Class TransformUncorrelatedInPredicateSubqueryToSemiJoin
java.lang.Object
io.trino.sql.planner.iterative.rule.TransformUncorrelatedInPredicateSubqueryToSemiJoin
public class TransformUncorrelatedInPredicateSubqueryToSemiJoin
extends Object
implements Rule<ApplyNode>
This optimizers looks for InPredicate expressions in ApplyNodes and replaces the nodes with SemiJoin nodes.
Plan before optimizer:
Filter(a IN b):
Apply
- correlation: [] // empty
- input: some plan A producing symbol a
- subquery: some plan B producing symbol b
Plan after optimizer:
Filter(semijoinresult):
SemiJoin
- source: plan A
- filteringSource: symbol a
- sourceJoinSymbol: plan B
- filteringSourceJoinSymbol: symbol b
- semiJoinOutput: semijoinresult
-
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 applyNode, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
TransformUncorrelatedInPredicateSubqueryToSemiJoin
public TransformUncorrelatedInPredicateSubqueryToSemiJoin()
-
-
Method Details