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

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

public 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
           
static class ExprProcFactory.FuncExprProcessor
          Process function descriptors.
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
 
Constructor Summary
ExprProcFactory()
           
 
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 getFuncProcessor()
           
static NodeProcessor getGenericFuncProcessor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExprProcFactory

public ExprProcFactory()
Method Detail

getDefaultExprProcessor

public static NodeProcessor getDefaultExprProcessor()

getFuncProcessor

public static NodeProcessor getFuncProcessor()

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 © 2009 The Apache Software Foundation