org.apache.hadoop.hive.ql.optimizer.ppr
Class ExprProcFactory

java.lang.Object
  extended by org.apache.hadoop.hive.ql.optimizer.ppr.ExprProcFactory

public final class ExprProcFactory
extends Object

Expression processor factory for partition pruning. Each processor tries to convert the expression subtree into a partition pruning expression. This expression is then used to figure out whether a particular partition should be scanned or not.


Nested Class Summary
static class ExprProcFactory.ColumnExprProcessor
          Processor for column expressions.
static class ExprProcFactory.DefaultExprProcessor
          Processor for constants and null expressions.
static class ExprProcFactory.FieldExprProcessor
          FieldExprProcessor.
static class ExprProcFactory.GenericFuncExprProcessor
          If all children are candidates and refer only to one table alias then this expr is a candidate else it is not a candidate but its children could be final candidates.
 
Method Summary
static ExprNodeDesc genPruner(String tabAlias, ExprNodeDesc pred, boolean hasNonPartCols)
          Generates the partition pruner for the expression tree.
static NodeProcessor getColumnProcessor()
           
static NodeProcessor getDefaultExprProcessor()
           
static NodeProcessor getFieldProcessor()
           
static NodeProcessor getGenericFuncProcessor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultExprProcessor

public static NodeProcessor getDefaultExprProcessor()

getGenericFuncProcessor

public static NodeProcessor getGenericFuncProcessor()

getFieldProcessor

public static NodeProcessor getFieldProcessor()

getColumnProcessor

public static NodeProcessor getColumnProcessor()

genPruner

public static ExprNodeDesc genPruner(String tabAlias,
                                     ExprNodeDesc pred,
                                     boolean hasNonPartCols)
                              throws SemanticException
Generates the partition pruner for the expression tree.

Parameters:
tabAlias - The table alias of the partition table that is being considered for pruning
pred - The predicate from which the partition pruner needs to be generated
Returns:
hasNonPartCols returns true/false depending upon whether this pred has a non partition column
Throws:
SemanticException


Copyright © 2010 The Apache Software Foundation