public DecomposedPredicate decomposePredicate(String keyColName, ExprNodeDesc predicate) {
    IndexPredicateAnalyzer analyzer = IndexPredicateAnalyzer.createAnalyzer(true);
    analyzer.allowColumnName(keyColName);
    analyzer.setAcceptsFields(true);
    analyzer.setFieldValidator(getFieldValidator());

    DecomposedPredicate decomposed = new DecomposedPredicate();

    List<IndexSearchCondition> conditions = new ArrayList<IndexSearchCondition>();
    decomposed.residualPredicate =
        (ExprNodeGenericFuncDesc) analyzer.analyzePredicate(predicate, conditions);
    if (!conditions.isEmpty()) {
      decomposed.pushedPredicate = analyzer.translateSearchConditions(conditions);
      try {
        decomposed.pushedPredicateObject = getScanRange(conditions);
      } catch (Exception e) {
        LOG.warn("Failed to decompose predicates", e);
        return null;
      }
    }

    return decomposed;
  }
Simple abstract class to help with creation of a {@link DecomposedPredicate}. In order to create
one, consumers should extend this class and override the "getScanRange" method to define the
start/stop keys and/or filters on their hbase scans
hbase-handler/src/java/org/apache/hadoop/hive/hbase/AbstractHBaseKeyPredicateDecomposer.java