Class RemoveRedundantSortBelowLimitWithTies
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.RemoveRedundantSortBelowLimitWithTies
-
public class RemoveRedundantSortBelowLimitWithTies extends Object implements Rule<LimitNode>
This rule removes SortNode being a source of LimitNode with ties. LimitNode with ties performs sorting, so the SortNode is redundant.Transforms:
- LimitNode count: n tiesResolvingScheme: (x) - SortNode: order by (y) - sourceinto:- LimitNode * count: n * tiesResolvingScheme: (x) * - source
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description RemoveRedundantSortBelowLimitWithTies()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(LimitNode node, Captures captures, Rule.Context context)Pattern<LimitNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<LimitNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<LimitNode>
-
apply
public Rule.Result apply(LimitNode node, Captures captures, Rule.Context context)
-
-