SearchArgument (Hive Storage API 2.1.1-pre-orc API)
Date: 2016-10-19

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

## Interface SearchArgument

- All Known Implementing Classes:
    SearchArgumentImpl

      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

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `SearchArgument.Builder` A builder object for contexts outside of Hive where it isn't easy to get a ExprNodeDesc.
    `static class` | `SearchArgument.TruthValue` The potential result sets of logical operations.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `SearchArgument.TruthValue` | `evaluate(SearchArgument.TruthValue[] leaves)` Evaluate the entire predicate based on the values for the leaf predicates.
    `ExpressionTree` | `getExpression()` Get the expression tree.
    `List<PredicateLeaf>` | `getLeaves()` Get the leaf predicates that are required to evaluate the predicate.

- - ### 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

    - #### getExpression

          ExpressionTree getExpression()

      Get the expression tree. This should only needed for file formats that need to translate the expression to an internal form.

    - #### 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 © 2016 The Apache Software Foundation. All rights reserved.