private Set<ExprNodeColumnDesc> collectColumnsInPredicates(List<ExprNodeDesc> predicates) {
      Set<ExprNodeColumnDesc> columnsInPredicates;
      columnsInPredicates = new HashSet<>();
      for (ExprNodeDesc predicate : predicates) {
        columnsInPredicates.addAll(ExprNodeDescUtils.findAllColumnDescs(predicate));
      }
      return columnsInPredicates;
    }
Traverse each predicate expression trees given in the predicates list and collect all ExprNodeColumnDesc.
@param predicates list of predicate expressions
@return union of ExprNodeColumnDescs referenced form the given predicates.
ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java