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(HashMap<Operator<? extends Serializable>,OpParseContext> opToParseContextMap)
           
 
Method Summary
 List<String> genColLists(Operator<? extends Serializable> 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 Serializable>,OpParseContext> getOpToParseCtxMap()
           
 List<String> getPrunedColList(Operator<? extends Serializable> op)
           
 Map<Operator<? extends Serializable>,List<String>> getPrunedColLists()
           
 List<String> getSelectColsFromChildren(SelectOperator op, List<String> colList)
          Creates the list of internal column names for select * expressions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnPrunerProcCtx

public ColumnPrunerProcCtx(HashMap<Operator<? extends Serializable>,OpParseContext> opToParseContextMap)
Method Detail

getJoinPrunedColLists

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

getPrunedColList

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

getOpToParseCtxMap

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

getPrunedColLists

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

genColLists

public List<String> genColLists(Operator<? extends Serializable> 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.


Copyright © 2013 The Apache Software Foundation