org.apache.hadoop.hive.ql.parse
Class ASTPartitionPruner

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.ASTPartitionPruner

public class ASTPartitionPruner
extends Object


Constructor Summary
ASTPartitionPruner()
           
ASTPartitionPruner(String tableAlias, QBMetaData metaData, HiveConf conf)
          Creates a new instance of PartitionPruner
 
Method Summary
 void addExpression(ASTNode expr)
          Add an expression
 void addJoinOnExpression(ASTNode expr)
          Add an expression from the JOIN condition.
 Table getTable()
           
 boolean hasPartitionPredicate(ASTNode expr)
           
static boolean mightBeUnknown(exprNodeDesc desc)
           
 boolean onlyContainsPartitionCols()
           
 PrunedPartitionList prune()
          From the table metadata prune the partitions to return the partitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTPartitionPruner

public ASTPartitionPruner()

ASTPartitionPruner

public ASTPartitionPruner(String tableAlias,
                          QBMetaData metaData,
                          HiveConf conf)
Creates a new instance of PartitionPruner

Method Detail

onlyContainsPartitionCols

public boolean onlyContainsPartitionCols()

mightBeUnknown

public static boolean mightBeUnknown(exprNodeDesc desc)

hasPartitionPredicate

public boolean hasPartitionPredicate(ASTNode expr)

addExpression

public void addExpression(ASTNode expr)
                   throws SemanticException
Add an expression

Throws:
SemanticException

addJoinOnExpression

public void addJoinOnExpression(ASTNode expr)
                         throws SemanticException
Add an expression from the JOIN condition. Since these expressions will be used for all the where clauses, they are always ANDed. Then we walk through the remaining filters (in the where clause) and OR them with the existing condition.

Throws:
SemanticException

prune

public PrunedPartitionList prune()
                          throws HiveException
From the table metadata prune the partitions to return the partitions. Evaluate the parition pruner for each partition and return confirmed and unknown partitions separately

Throws:
HiveException

getTable

public Table getTable()


Copyright © 2009 The Apache Software Foundation