Class RemoveRedundantOffset
java.lang.Object
io.trino.sql.planner.iterative.rule.RemoveRedundantOffset
- All Implemented Interfaces:
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.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(OffsetNode offset, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
RemoveRedundantOffset
public RemoveRedundantOffset()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<OffsetNode>
-
apply
- Specified by:
applyin interfaceRule<OffsetNode>
-