private static void translate(ExpressionTree root, List<PredicateLeaf> leaves, boolean isNot,
                                Schema schema, List<KuduPredicate> results) {
    switch (root.getOperator()) {
    case OR:
      if (isNot) {
        // Converts to an AND: not (A or B) = not A and not B
        for(ExpressionTree child: root.getChildren()) {
          translate(child, leaves, isNot, schema, results);
        }
      } else {
        // Kudu doesn't support OR predicates.
        return;
      }
    case AND:
      if (isNot) {
        // Converts to an OR: not (A and B) = not A or not B
        // Kudu doesn't support OR predicates.
        return;
      } else {
        for(ExpressionTree child: root.getChildren()) {
          translate(child, leaves, isNot, schema, results);
        }
        return;
      }
    case NOT:
      // Kudu doesn't support general NOT predicates, but some NOT operators
      // can be converted into Kudu predicates. See leafToPredicates below.
      translate(root.getChildren().get(0), leaves, !isNot, schema, results);
      return;
    case LEAF:
      PredicateLeaf leaf = leaves.get(root.getLeaf());
      if (schema.hasColumn(leaf.getColumnName())) {
        results.addAll(leafToPredicates(leaf, isNot, schema));
      }
      return;
    case CONSTANT:
      return; // no predicate for constant
    default:
      throw new IllegalStateException("Unknown operator: " + root.getOperator());
    }
  }
Translate the search argument to the KuduPredicates.
kudu-handler/src/java/org/apache/hadoop/hive/kudu/KuduPredicateHandler.java