Class RemoveRedundantTopN
java.lang.Object
io.trino.sql.planner.iterative.rule.RemoveRedundantTopN
Replace TopN node
1. With a Sort node when the subplan is guaranteed to produce fewer rows than N
2. With its source when the subplan produces only one row
3. With a empty ValuesNode when N 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(TopNNode node, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.