public class PushProjects extends Object implements OptimizerRule
PlanNode.Type.PROJECT
nodes. For example, every PlanNode.Type.ACCESS
node
needs to have a PROJECT node below it and above any other nodes (e.g., PlanNode.Type.SELECT
or PlanNode.Type.SOURCE
nodes). This
rule ensures that the PROJECT exists, but it also attempts to reduce any unnecessary columns in existing PROJECT nodes.Modifier and Type | Field and Description |
---|---|
static PushProjects |
INSTANCE |
Constructor and Description |
---|
PushProjects() |
Modifier and Type | Method and Description |
---|---|
PlanNode |
execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack)
Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.
|
protected Set<SelectorName> |
getSelectorsFor(List<Column> columns) |
String |
toString() |
public static final PushProjects INSTANCE
public PlanNode execute(QueryContext context, PlanNode plan, LinkedList<OptimizerRule> ruleStack)
OptimizerRule
execute
in interface OptimizerRule
context
- the context in which the query is being optimized; never nullplan
- the plan to be optimized; never nullruleStack
- the stack of rules that will be run after this rule; never nullprotected Set<SelectorName> getSelectorsFor(List<Column> columns)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.