Class PruneExchangeColumns
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.ProjectOffPushDownRule<ExchangeNode>
-
- io.prestosql.sql.planner.iterative.rule.PruneExchangeColumns
-
- All Implemented Interfaces:
Rule<ProjectNode>
public class PruneExchangeColumns extends ProjectOffPushDownRule<ExchangeNode>
This rule restricts the outputs of ExchangeNode based on which ExchangeNode's output symbols are either referenced by the parent node or used for partitioning, ordering or as a hash symbol by the ExchangeNode.For each symbol removed from the output symbols list, the corresponding input symbols are removed from ExchangeNode's inputs lists.
Transforms:
- Project (o1) - Exchange: outputs [o1, o2, o3, h] partitioning by (o2) hash h inputs [[a1, a2, a3, h1], [b1, b2, b3, h2]] - source [a1, a2, a3, h1] - source [b1, b2, b3, h2]
Into:- Project (o1) - Exchange: outputs [o1, o2, h] partitioning by (o2) hash h inputs [[a1, a2, h1], [b1, b2, h2]] - source [a1, a2, a3, h1] - source [b1, b2, b3, h2]
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PruneExchangeColumns()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<PlanNode>
pushDownProjectOff(Rule.Context context, ExchangeNode exchangeNode, 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, ExchangeNode exchangeNode, Set<Symbol> referencedOutputs)
- Specified by:
pushDownProjectOff
in classProjectOffPushDownRule<ExchangeNode>
-
-