Class RemoveRedundantOffset
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.RemoveRedundantOffset
-
- All Implemented Interfaces:
Rule<OffsetNode>
public class RemoveRedundantOffset extends Object implements Rule<OffsetNode>
Remove Offset node and its subplan when the subplan is guaranteed to produce no more rows than the offset and replace the plan with empty values. Remove Offset node from the plan if the offset is 0.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description RemoveRedundantOffset()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Result
apply(OffsetNode offset, 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 offset, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<OffsetNode>
-
-