Class PushDownDereferencesThroughWindow
java.lang.Object
io.trino.sql.planner.iterative.rule.PushDownDereferencesThroughWindow
- All Implemented Interfaces:
Rule<ProjectNode>
Transforms:
Project(G := f1(A.x), H := f2(B.x), J := f3(C.x), K := f4(D.x), L := f5(F))
Window(orderBy = [B], partitionBy = [C], min_D := min(D))
Source(A, B, C, D, E, F)
to:
Project(G := f1(symbol), H := f2(B.x), J := f3(C.x), K := f4(D.x), L := f5(F))
Window(orderBy = [B], partitionBy = [C], min_D := min(D))
Project(A, B, C, D, E, F, symbol := A.x)
Source(A, B, C, D, E, F)
Pushes down dereference projections through Window. Excludes dereferences on symbols in ordering scheme and partitionBy 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
-
PushDownDereferencesThroughWindow
public PushDownDereferencesThroughWindow()
-
-
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>
-