Class ImplementOffset
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.ImplementOffset
-
- All Implemented Interfaces:
Rule<OffsetNode>
public class ImplementOffset extends Object implements Rule<OffsetNode>
Transforms:- Offset (row count = x) - Source
Into:- Project (prune rowNumber symbol) - Filter (rowNumber > x) - RowNumber - Source
Relies on RowNumberNode's property of keeping order of its input. If the query contains an ORDER BY clause, the sorted order will be respected when leading rows are removed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description ImplementOffset()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Result
apply(OffsetNode parent, Captures captures, Rule.Context context)
Pattern<OffsetNode>
getPattern()
Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<OffsetNode> getPattern()
Description copied from interface:Rule
Returns a pattern to which plan nodes this rule applies.- Specified by:
getPattern
in interfaceRule<OffsetNode>
-
apply
public Rule.Result apply(OffsetNode parent, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<OffsetNode>
-
-