Class PushPredicateThroughProjectIntoRowNumber
java.lang.Object
io.trino.sql.planner.iterative.rule.PushPredicateThroughProjectIntoRowNumber
- All Implemented Interfaces:
Rule<FilterNode>
This rule pushes filter predicate concerning row number symbol into RowNumberNode
by modifying maxRowCountPerPartition. It skips an identity projection
separating FilterNode from RowNumberNode in the plan tree.
TODO This rule should be removed as soon as RowNumberNode becomes capable of absorbing pruning projections (i.e. capable of pruning outputs).
Transforms:
- Filter (rowNumber invalid input: '<'= 5 invalid input: '&'invalid input: '&' a > 1) - Project (a, rowNumber) - RowNumber (maxRowCountPerPartition = 10) - source (a, b)into:
- Filter (a > 1)
- Project (a, rowNumber)
- RowNumber (maxRowCountPerPartition = 5)
- source (a, b)
-
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(FilterNode filter, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
PushPredicateThroughProjectIntoRowNumber
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<FilterNode>
-
apply
- Specified by:
applyin interfaceRule<FilterNode>
-