Class ReplaceRedundantJoinWithSource
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.ReplaceRedundantJoinWithSource
-
public class ReplaceRedundantJoinWithSource extends Object implements Rule<JoinNode>
This rule transforms plans with joins, where: - one of the sources is scalar and produces no output symbols. In case of LEFT or RIGHT join, it has to be the inner source. In case of FULL or INNER join, it can be either source. - the other join source is at least scalar (not known to be empty).The join is replaced with the other source and an optional pruning projection.
Note: This rule does not transform plans where either join source is empty. Such plans are transformed by RemoveRedundantJoin and ReplaceRedundantJoinWithProject rules.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description ReplaceRedundantJoinWithSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(JoinNode node, Captures captures, Rule.Context context)Pattern<JoinNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<JoinNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<JoinNode>
-
apply
public Rule.Result apply(JoinNode node, Captures captures, Rule.Context context)
-
-