public class ProjectionPushDownRule extends BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode> implements LogicalPlanRewriteRule
Projectable
nodes. In this process, the expressions are usually pushed down into as lower as possible.
It also enables scanners to read only necessary columns.| Modifier and Type | Class and Description |
|---|---|
static class |
ProjectionPushDownRule.TargetListManager
What is TargetListManager?
|
| Constructor and Description |
|---|
ProjectionPushDownRule() |
postHook, preHook, visit, visit, visitAlterTable, visitAlterTablespace, visitCreateDatabase, visitCreateTable, visitDistinctGroupby, visitDropDatabase, visitDropTable, visitEvalExpr, visitExcept, visitIntersect, visitSetSession, visitStoreTable, visitTruncateTablepublic String getName()
LogicalPlanRewriteRulegetName in interface LogicalPlanRewriteRulepublic boolean isEligible(OverridableConf queryContext, LogicalPlan plan)
LogicalPlanRewriteRuleisEligible in interface LogicalPlanRewriteRuleplan - The plan to be checkedpublic LogicalPlan rewrite(OverridableConf queryContext, LogicalPlan plan) throws PlanningException
LogicalPlanRewriteRulerewrite in interface LogicalPlanRewriteRuleplan - Input logical plan. It will not be modified.PlanningExceptionpublic LogicalNode visitRoot(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, LogicalRootNode node, Stack<LogicalNode> stack) throws PlanningException
visitRoot in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitRoot in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitProjection(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, ProjectionNode node, Stack<LogicalNode> stack) throws PlanningException
visitProjection in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitProjection in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitLimit(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, LimitNode node, Stack<LogicalNode> stack) throws PlanningException
visitLimit in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitLimit in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitSort(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, SortNode node, Stack<LogicalNode> stack) throws PlanningException
visitSort in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitSort in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitHaving(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, HavingNode node, Stack<LogicalNode> stack) throws PlanningException
visitHaving in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitHaving in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitWindowAgg(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, WindowAggNode node, Stack<LogicalNode> stack) throws PlanningException
visitWindowAgg in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitWindowAgg in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitGroupBy(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, GroupbyNode node, Stack<LogicalNode> stack) throws PlanningException
visitGroupBy in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitGroupBy in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic static Target[] buildGroupByTarget(GroupbyNode groupbyNode, @Nullable List<Target> groupingKeyTargets, String[] aggEvalNames)
public LogicalNode visitFilter(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, SelectionNode node, Stack<LogicalNode> stack) throws PlanningException
visitFilter in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitFilter in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitJoin(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, JoinNode node, Stack<LogicalNode> stack) throws PlanningException
visitJoin in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitJoin in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitUnion(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, UnionNode node, Stack<LogicalNode> stack) throws PlanningException
visitUnion in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitUnion in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitScan(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, ScanNode node, Stack<LogicalNode> stack) throws PlanningException
visitScan in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitScan in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitPartitionedTableScan(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, PartitionedTableScanNode node, Stack<LogicalNode> stack) throws PlanningException
visitPartitionedTableScan in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitPartitionedTableScan in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitTableSubQuery(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context upperContext, LogicalPlan plan, LogicalPlan.QueryBlock block, TableSubQueryNode node, Stack<LogicalNode> stack) throws PlanningException
visitTableSubQuery in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitTableSubQuery in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionpublic LogicalNode visitInsert(org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context context, LogicalPlan plan, LogicalPlan.QueryBlock block, InsertNode node, Stack<LogicalNode> stack) throws PlanningException
visitInsert in interface LogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>visitInsert in class BasicLogicalPlanVisitor<org.apache.tajo.plan.rewrite.rules.ProjectionPushDownRule.Context,LogicalNode>PlanningExceptionCopyright © 2015 Apache Software Foundation. All Rights Reserved.