org.apache.hadoop.hive.ql.optimizer.ppr
Class ExprProcFactory
java.lang.Object
org.apache.hadoop.hive.ql.optimizer.PrunerExpressionOperatorFactory
org.apache.hadoop.hive.ql.optimizer.ppr.ExprProcFactory
public final class ExprProcFactory
- extends PrunerExpressionOperatorFactory
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.
* Refactor:
Move main logic to PrunerExpressionOperatorFactory. ExprProcFactory extends it to reuse logic.
Any other pruner can reuse it by creating a class extending from PrunerExpressionOperatorFactory.
Only specific logic is in genPruner(..) which is in its own class like ExprProcFactory.
getColumnProcessor
public static NodeProcessor getColumnProcessor()
- Instantiate column processor.
- Returns:
genPruner
public static ExprNodeDesc genPruner(String tabAlias,
ExprNodeDesc pred)
throws SemanticException
- Generates the partition pruner for the expression tree.
- Parameters:
tabAlias
- The table alias of the partition table that is being considered
for pruningpred
- The predicate from which the partition pruner needs to be
generated
- Returns:
- The pruner expression.
- Throws:
SemanticException
Copyright © 2014 The Apache Software Foundation. All rights reserved.