org.apache.hadoop.hive.ql.io.sarg
Interface SearchArgument


public interface SearchArgument

Primary interface for SearchArgument, which are the subset of predicates that can be pushed down to the RecordReader. Each SearchArgument consists of a series of SearchClauses that must each be true for the row to be accepted by the filter. This requires that the filter be normalized into conjunctive normal form (CNF).


Nested Class Summary
static interface SearchArgument.Builder
          A builder object for contexts outside of Hive where it isn't easy to get a ExprNodeDesc.
static class SearchArgument.Factory
          A factory for creating SearchArguments.
static class SearchArgument.TruthValue
          The potential result sets of logical operations.
 
Field Summary
static SearchArgument.Factory FACTORY
          Use this instance to create SearchArgument instances.
 
Method Summary
 SearchArgument.TruthValue evaluate(SearchArgument.TruthValue[] leaves)
          Evaluate the entire predicate based on the values for the leaf predicates.
 List<PredicateLeaf> getLeaves()
          Get the leaf predicates that are required to evaluate the predicate.
 

Field Detail

FACTORY

static final SearchArgument.Factory FACTORY
Use this instance to create SearchArgument instances.

Method Detail

getLeaves

List<PredicateLeaf> getLeaves()
Get the leaf predicates that are required to evaluate the predicate. The list will have the duplicates removed.

Returns:
the list of leaf predicates

evaluate

SearchArgument.TruthValue evaluate(SearchArgument.TruthValue[] leaves)
Evaluate the entire predicate based on the values for the leaf predicates.

Parameters:
leaves - the value of each leaf predicate
Returns:
the value of hte entire predicate


Copyright © 2012 The Apache Software Foundation