Class PruneExchangeColumns
java.lang.Object
io.trino.sql.planner.iterative.rule.ProjectOffPushDownRule<ExchangeNode>
io.trino.sql.planner.iterative.rule.PruneExchangeColumns
- All Implemented Interfaces:
Rule<ProjectNode>
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.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionpushDownProjectOff(Rule.Context context, ExchangeNode exchangeNode, Set<Symbol> referencedOutputs) Methods inherited from class io.trino.sql.planner.iterative.rule.ProjectOffPushDownRule
apply, getPattern
-
Constructor Details
-
PruneExchangeColumns
public PruneExchangeColumns()
-
-
Method Details
-
pushDownProjectOff
protected Optional<PlanNode> pushDownProjectOff(Rule.Context context, ExchangeNode exchangeNode, Set<Symbol> referencedOutputs) - Specified by:
pushDownProjectOffin classProjectOffPushDownRule<ExchangeNode>
-