Class PushDownDereferenceThroughJoin
java.lang.Object
io.trino.sql.planner.iterative.rule.PushDownDereferenceThroughJoin
- All Implemented Interfaces:
Rule<ProjectNode>
Transforms:
Project(A_X := f1(A.x), G := f2(A_Y.z), E := f3(B))
Join(A_Y = C_Y) => [A, B]
Project(A_Y := A.y, A, B)
Source(A, B)
Project(C_Y := C.y)
Source(C, D)
to:
Project(A_X := f1(symbol), G := f2(A_Y.z), E := f3(B))
Join(A_Y = C_Y) => [symbol, B]
Project(symbol := A.x, A_Y := A.y, A, B)
Source(A, B)
Project(C_Y := C.y)
Source(C, D)
Pushes down dereference projections through JoinNode. Excludes dereferences on symbols being used in join criteria to avoid data replication, since these symbols 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
-
PushDownDereferenceThroughJoin
public PushDownDereferenceThroughJoin()
-
-
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>
-