Class PushPredicateThroughProjectIntoRowNumber
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.PushPredicateThroughProjectIntoRowNumber
-
- All Implemented Interfaces:
Rule<FilterNode>
public class PushPredicateThroughProjectIntoRowNumber extends Object implements 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 <= 5 && 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.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PushPredicateThroughProjectIntoRowNumber(Metadata metadata, TypeOperators typeOperators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Result
apply(FilterNode filter, Captures captures, Rule.Context context)
Pattern<FilterNode>
getPattern()
Returns a pattern to which plan nodes this rule applies.
-
-
-
Constructor Detail
-
PushPredicateThroughProjectIntoRowNumber
public PushPredicateThroughProjectIntoRowNumber(Metadata metadata, TypeOperators typeOperators)
-
-
Method Detail
-
getPattern
public Pattern<FilterNode> getPattern()
Description copied from interface:Rule
Returns a pattern to which plan nodes this rule applies.- Specified by:
getPattern
in interfaceRule<FilterNode>
-
apply
public Rule.Result apply(FilterNode filter, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<FilterNode>
-
-