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.
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 getSplitsdeserializer
- deserializer which will be used when
fetching rowspredicate
- 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.