Class PushDownDereferenceThroughSemiJoin
java.lang.Object
io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughSemiJoin
- All Implemented Interfaces:
Rule<ProjectNode>
Transforms:
Project(D := f1(A.x), E := f2(B.x), G := f3(C))
SemiJoin(sourceJoinSymbol = B, filteringSourceJoinSymbol = B_filtering)
Source(A, B, C)
FilteringSource(B_filtering)
to:
Project(D := f1(symbol), E := f2(B.x), G := f3(C))
SemiJoinNode(sourceJoinSymbol = B, filteringSourceJoinSymbol = B_filtering)
Project(A, B, C, symbol := A.x)
Source(A, B, C)
FilteringSource(B_filtering)
Pushes down dereference projections through SemiJoinNode. Excludes dereferences on sourceJoinSymbol to avoid data replication, since this symbol cannot be pruned.
-
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(ProjectNode projectNode, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
PushDownDereferenceThroughSemiJoin
public PushDownDereferenceThroughSemiJoin()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<ProjectNode>
-
apply
- Specified by:
applyin interfaceRule<ProjectNode>
-