Class ProjectOffPushDownRule<N extends PlanNode>
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.ProjectOffPushDownRule<N>
-
- Type Parameters:
N- The node type to look for under the ProjectNode Looks for a Project parent over a N child, such that the parent doesn't use all the output columns of the child. Given that situation, invokes the pushDownProjectOff helper to possibly rewrite the child to produce fewer outputs.
- All Implemented Interfaces:
Rule<ProjectNode>
- Direct Known Subclasses:
PruneAggregationColumns,PruneApplyColumns,PruneAssignUniqueIdColumns,PruneCorrelatedJoinColumns,PruneEnforceSingleRowColumns,PruneExchangeColumns,PruneFilterColumns,PruneGroupIdColumns,PruneIndexJoinColumns,PruneIndexSourceColumns,PruneJoinColumns,PruneLimitColumns,PruneMarkDistinctColumns,PruneOffsetColumns,PrunePattenRecognitionColumns,PruneProjectColumns,PruneRowNumberColumns,PruneSampleColumns,PruneSemiJoinColumns,PruneSortColumns,PruneSpatialJoinColumns,PruneTableScanColumns,PruneTopNColumns,PruneTopNRankingColumns,PruneUnionColumns,PruneUnnestColumns,PruneValuesColumns,PruneWindowColumns
public abstract class ProjectOffPushDownRule<N extends PlanNode> extends Object implements Rule<ProjectNode>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedProjectOffPushDownRule(Pattern<N> targetPattern)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(ProjectNode parent, Captures captures, Rule.Context context)Pattern<ProjectNode>getPattern()Returns a pattern to which plan nodes this rule applies.protected abstract Optional<PlanNode>pushDownProjectOff(Rule.Context context, N targetNode, Set<Symbol> referencedOutputs)
-
-
-
Method Detail
-
getPattern
public Pattern<ProjectNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<N extends PlanNode>
-
apply
public Rule.Result apply(ProjectNode parent, Captures captures, Rule.Context context)
-
-