Class PruneUnionColumns
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.ProjectOffPushDownRule<UnionNode>
-
- io.prestosql.sql.planner.iterative.rule.PruneUnionColumns
-
- All Implemented Interfaces:
Rule<ProjectNode>
public class PruneUnionColumns extends ProjectOffPushDownRule<UnionNode>
Transforms- Project (a) - Union output mappings: {a->c, a->e, b->d, b->f} - Source (c, d) - Source (e, f)
into:- Project (a) - Union output mappings: {a->c, a->e} - Source (c, d) - Source (e, f)
Note: as a result of this rule, the UnionNode's sources are eligible for pruning outputs. This is accomplished by PruneUnionSourceColumns rule.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description PruneUnionColumns()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<PlanNode>
pushDownProjectOff(Rule.Context context, UnionNode unionNode, 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, UnionNode unionNode, Set<Symbol> referencedOutputs)
- Specified by:
pushDownProjectOff
in classProjectOffPushDownRule<UnionNode>
-
-