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