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.public abstract class ProjectOffPushDownRule<N extends PlanNode> extends Object implements Rule<ProjectNode>
Rule.Context, Rule.Result| Modifier | Constructor and Description |
|---|---|
protected |
ProjectOffPushDownRule(Pattern<N> targetPattern) |
| Modifier and Type | Method and Description |
|---|---|
Rule.Result |
apply(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(PlanNodeIdAllocator idAllocator,
N targetNode,
Set<Symbol> referencedOutputs) |
public Pattern<ProjectNode> getPattern()
RulegetPattern in interface Rule<ProjectNode>public Rule.Result apply(ProjectNode parent, Captures captures, Rule.Context context)
apply in interface Rule<ProjectNode>Copyright © 2012–2019. All rights reserved.