Class PushTopNThroughOuterJoin
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.PushTopNThroughOuterJoin
-
public class PushTopNThroughOuterJoin extends Object implements Rule<TopNNode>
Transforms:- TopN (partial) - Join (left, right) - left source - right sourceInto:- Join - TopN (present if Join is left, not already limited, and orderBy symbols come from left source) - left source - TopN (present if Join is right, not already limited, and orderBy symbols come from right source) - right sourceTODO: this Rule violates the expectation that Rule transformations must preserve the semantics of the expression subtree. It works only because it's a PARTIAL TopN, so there will be a FINAL TopN that "fixes" it.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PushTopNThroughOuterJoin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(TopNNode parent, Captures captures, Rule.Context context)Pattern<TopNNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<TopNNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<TopNNode>
-
apply
public Rule.Result apply(TopNNode parent, Captures captures, Rule.Context context)
-
-