Class PruneCorrelatedJoinColumns
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.ProjectOffPushDownRule<CorrelatedJoinNode>
-
- io.prestosql.sql.planner.iterative.rule.PruneCorrelatedJoinColumns
-
- All Implemented Interfaces:
Rule<ProjectNode>
public class PruneCorrelatedJoinColumns extends ProjectOffPushDownRule<CorrelatedJoinNode>
This rule restricts the outputs of CorrelatedJoinNode's input and subquery based on which CorrelatedJoinNode's output symbols are referenced.A symbol from input can be pruned, when - it is not a referenced output symbol, - it is not a correlation symbol, - it is not present in join filter.
A symbol from subquery can be pruned, when - it is not a referenced output symbol, - it is not present in join filetr.
Note: this rule does not remove any symbols from the correlation list. This is responsibility of PruneCorrelatedJoinCorrelation rule.
Transforms:
- Project (a, c) - CorrelatedJoin correlation: [corr] filter: a > d - Input (a, b, corr) - Subquery (c, d, e)
Into:- Project (a, c) - CorrelatedJoin correlation: [corr] filter: a > d - Project (a, corr) - Input (a, b, corr) - Project (c, d) - Subquery (c, d, e)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PruneCorrelatedJoinColumns()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<PlanNode>
pushDownProjectOff(Rule.Context context, CorrelatedJoinNode correlatedJoinNode, Set<Symbol> referencedOutputs)
-
Methods inherited from class io.prestosql.sql.planner.iterative.rule.ProjectOffPushDownRule
apply, getPattern
-
-
-
-
Method Detail
-
pushDownProjectOff
protected Optional<PlanNode> pushDownProjectOff(Rule.Context context, CorrelatedJoinNode correlatedJoinNode, Set<Symbol> referencedOutputs)
- Specified by:
pushDownProjectOff
in classProjectOffPushDownRule<CorrelatedJoinNode>
-
-