static ExpressionTree optimize(ExpressionTree root) {
      ExpressionTree optimized = pushDownNot(root);
      optimized = foldMaybe(optimized);
      return flatten(optimized);
    }
Recursively explore the tree to find the leaves that are still reachable
after optimizations.
@param tree the node to check next
@param leaves the list of leaves that were found
storage-api/src/java/org/apache/hadoop/hive/ql/io/sarg/SearchArgumentImpl.java