|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.index.IndexPredicateAnalyzer
public class IndexPredicateAnalyzer
IndexPredicateAnalyzer decomposes predicates, separating the parts which can be satisfied by an index from the parts which cannot. Currently, it only supports pure conjunctions over binary expressions comparing a column reference with a constant value. It is assumed that all column aliases encountered refer to the same table.
Constructor Summary | |
---|---|
IndexPredicateAnalyzer()
|
Method Summary | |
---|---|
void |
addComparisonOp(String udfName)
Registers a comparison operator as one which can be satisfied by an index search. |
void |
allowColumnName(String columnName)
Adds a column name to the set of column names allowed. |
ExprNodeDesc |
analyzePredicate(ExprNodeDesc predicate,
List<IndexSearchCondition> searchConditions)
Analyzes a predicate. |
void |
clearAllowedColumnNames()
Clears the set of column names allowed in comparisons. |
ExprNodeDesc |
translateSearchConditions(List<IndexSearchCondition> searchConditions)
Translates search conditions back to ExprNodeDesc form (as a left-deep conjunction). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexPredicateAnalyzer()
Method Detail |
---|
public void addComparisonOp(String udfName)
udfName
- name of comparison operator as returned
by either GenericUDFBridge.getUdfName()
(for simple UDF's)
or udf.getClass().getName() (for generic UDF's).public void clearAllowedColumnNames()
public void allowColumnName(String columnName)
columnName
- name of column to be allowedpublic ExprNodeDesc analyzePredicate(ExprNodeDesc predicate, List<IndexSearchCondition> searchConditions)
predicate
- predicate to be analyzedsearchConditions
- receives conditions produced by analysis
public ExprNodeDesc translateSearchConditions(List<IndexSearchCondition> searchConditions)
searchConditions
- (typically produced by analyzePredicate)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |