org.apache.hadoop.hive.ql.optimizer.pcr
Class PcrExprProcFactory

java.lang.Object
  extended by org.apache.hadoop.hive.ql.optimizer.pcr.PcrExprProcFactory

public final class PcrExprProcFactory
extends Object

Expression processor factory for partition condition removing. Each processor tries to calculate a result vector from its children's result vectors. Each element is the result for one of the pruned partitions. It also generates node by Modifying expr trees with partition conditions removed


Nested Class Summary
static class PcrExprProcFactory.ColumnExprProcessor
          Processor for column expressions.
static class PcrExprProcFactory.DefaultExprProcessor
          Processor for constants and null expressions.
static class PcrExprProcFactory.FieldExprProcessor
          FieldExprProcessor.
static class PcrExprProcFactory.GenericFuncExprProcessor
          Processor for Generic functions If it is AND, OR or NOT, we replace the node to be the constant true or false if we are sure the result from children, or cut one of the child if we know partial results.
static class PcrExprProcFactory.NodeInfoWrapper
           
static class PcrExprProcFactory.WalkState
           
 
Method Summary
static NodeProcessor getColumnProcessor()
           
static NodeProcessor getDefaultExprProcessor()
           
static NodeProcessor getFieldProcessor()
           
static NodeProcessor getGenericFuncProcessor()
           
static ExprNodeGenericFuncDesc getOutExpr(ExprNodeGenericFuncDesc funcExpr, Object[] nodeOutputs)
           
static PcrExprProcFactory.NodeInfoWrapper walkExprTree(String tabAlias, ArrayList<Partition> parts, List<VirtualColumn> vcs, ExprNodeDesc pred)
          Remove partition conditions when necessary from the the expression tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getOutExpr

public static ExprNodeGenericFuncDesc getOutExpr(ExprNodeGenericFuncDesc funcExpr,
                                                 Object[] nodeOutputs)

getDefaultExprProcessor

public static NodeProcessor getDefaultExprProcessor()

getGenericFuncProcessor

public static NodeProcessor getGenericFuncProcessor()

getFieldProcessor

public static NodeProcessor getFieldProcessor()

getColumnProcessor

public static NodeProcessor getColumnProcessor()

walkExprTree

public static PcrExprProcFactory.NodeInfoWrapper walkExprTree(String tabAlias,
                                                              ArrayList<Partition> parts,
                                                              List<VirtualColumn> vcs,
                                                              ExprNodeDesc pred)
                                                       throws SemanticException
Remove partition conditions when necessary from the the expression tree.

Parameters:
tabAlias - the table alias
parts - the list of all pruned partitions for the table
vcs - virtual columns referenced
pred - expression tree of the target filter operator
Returns:
the node information of the root expression
Throws:
SemanticException


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