org.apache.hadoop.hive.ql.metadata
Interface HiveStoragePredicateHandler


public interface HiveStoragePredicateHandler

HiveStoragePredicateHandler is an optional companion to HiveStorageHandler; it should only be implemented by handlers which support decomposition of predicates being pushed down into table scans.


Nested Class Summary
static class HiveStoragePredicateHandler.DecomposedPredicate
          Struct class for returning multiple values from decomposePredicate.
 
Method Summary
 HiveStoragePredicateHandler.DecomposedPredicate decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf, Deserializer deserializer, ExprNodeDesc predicate)
          Gives the storage handler a chance to decompose a predicate.
 

Method Detail

decomposePredicate

HiveStoragePredicateHandler.DecomposedPredicate decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf,
                                                                   Deserializer deserializer,
                                                                   ExprNodeDesc predicate)
Gives the storage handler a chance to decompose a predicate. The storage handler should analyze the predicate and return the portion of it which cannot be evaluated during table access. For example, if the original predicate is x = 2 AND upper(y)='YUM', the storage handler might be able to handle x = 2 but leave the "residual" upper(y)='YUM' for Hive to deal with. The breakdown need not be non-overlapping; for example, given the predicate x LIKE 'a%b', the storage handler might be able to evaluate the prefix search x LIKE 'a%', leaving x LIKE '%b' as the residual.

Parameters:
jobConf - contains a job configuration matching the one that will later be passed to getRecordReader and getSplits
deserializer - deserializer which will be used when fetching rows
predicate - predicate to be decomposed
Returns:
decomposed form of predicate, or null if no pushdown is possible at all


Copyright © 2014 The Apache Software Foundation. All rights reserved.