org.apache.hadoop.hive.ql.optimizer
Class ColumnPrunerProcCtx

java.lang.Object
  extended by org.apache.hadoop.hive.ql.optimizer.ColumnPrunerProcCtx
All Implemented Interfaces:
NodeProcessorCtx

public class ColumnPrunerProcCtx
extends Object
implements NodeProcessorCtx

This class implements the processor context for Column Pruner.


Constructor Summary
ColumnPrunerProcCtx(ParseContext pctx)
           
 
Method Summary
 List<String> genColLists(Operator<? extends OperatorDesc> curOp)
          Creates the list of internal column names(these names are used in the RowResolver and are different from the external column names) that are needed in the subtree.
 List<String> getColsFromSelectExpr(SelectOperator op)
          Creates the list of internal column names from select expressions in a select operator.
 Map<CommonJoinOperator,Map<Byte,List<String>>> getJoinPrunedColLists()
           
 HashMap<Operator<? extends OperatorDesc>,OpParseContext> getOpToParseCtxMap()
           
 ParseContext getParseContext()
           
 List<String> getPrunedColList(Operator<? extends OperatorDesc> op)
           
 Map<Operator<? extends OperatorDesc>,List<String>> getPrunedColLists()
           
 List<String> getSelectColsFromChildren(SelectOperator op, List<String> colList)
          Creates the list of internal column names for select * expressions.
 List<String> getSelectColsFromLVJoin(RowResolver rr, List<String> colList)
          Create the list of internal columns for select tag of LV
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnPrunerProcCtx

public ColumnPrunerProcCtx(ParseContext pctx)
Method Detail

getParseContext

public ParseContext getParseContext()

getJoinPrunedColLists

public Map<CommonJoinOperator,Map<Byte,List<String>>> getJoinPrunedColLists()

getPrunedColList

public List<String> getPrunedColList(Operator<? extends OperatorDesc> op)
Returns:
the prunedColLists

getOpToParseCtxMap

public HashMap<Operator<? extends OperatorDesc>,OpParseContext> getOpToParseCtxMap()

getPrunedColLists

public Map<Operator<? extends OperatorDesc>,List<String>> getPrunedColLists()

genColLists

public List<String> genColLists(Operator<? extends OperatorDesc> curOp)
                         throws SemanticException
Creates the list of internal column names(these names are used in the RowResolver and are different from the external column names) that are needed in the subtree. These columns eventually have to be selected from the table scan.

Parameters:
curOp - The root of the operator subtree.
Returns:
List of the internal column names.
Throws:
SemanticException

getColsFromSelectExpr

public List<String> getColsFromSelectExpr(SelectOperator op)
Creates the list of internal column names from select expressions in a select operator. This function is used for the select operator instead of the genColLists function (which is used by the rest of the operators).

Parameters:
op - The select operator.
Returns:
List of the internal column names.

getSelectColsFromChildren

public List<String> getSelectColsFromChildren(SelectOperator op,
                                              List<String> colList)
Creates the list of internal column names for select * expressions.

Parameters:
op - The select operator.
colList - The list of internal column names returned by the children of the select operator.
Returns:
List of the internal column names.

getSelectColsFromLVJoin

public List<String> getSelectColsFromLVJoin(RowResolver rr,
                                            List<String> colList)
                                     throws SemanticException
Create the list of internal columns for select tag of LV

Throws:
SemanticException


Copyright © 2014 The Apache Software Foundation. All rights reserved.