public static void getExprNodeColumnDesc(ExprNodeDesc exprDesc,
      Multimap<Integer, ExprNodeColumnDesc> hashCodeToColumnDescMap) {
    if (exprDesc instanceof ExprNodeColumnDesc) {
      Collection<ExprNodeColumnDesc> nodes = hashCodeToColumnDescMap.get(exprDesc.hashCode());
      boolean insert = true;
      for (ExprNodeColumnDesc node : nodes) {
        if (node.isSame(exprDesc)) {
          insert = false;
          break;
        }
      }
      if (insert) {
        nodes.add((ExprNodeColumnDesc) exprDesc);
      }
    } else if (exprDesc instanceof ExprNodeColumnListDesc) {
      for (ExprNodeDesc child : exprDesc.getChildren()) {
        getExprNodeColumnDesc(child, hashCodeToColumnDescMap);
      }
    } else if (exprDesc instanceof ExprNodeGenericFuncDesc) {
      for (ExprNodeDesc child : exprDesc.getChildren()) {
        getExprNodeColumnDesc(child, hashCodeToColumnDescMap);
      }
    } else if (exprDesc instanceof ExprNodeFieldDesc) {
      getExprNodeColumnDesc(((ExprNodeFieldDesc) exprDesc).getDesc(),
          hashCodeToColumnDescMap);
    } else if(exprDesc instanceof  ExprNodeSubQueryDesc) {
      getExprNodeColumnDesc(((ExprNodeSubQueryDesc) exprDesc).getSubQueryLhs(),
          hashCodeToColumnDescMap);
    }
  }
Get Map of ExprNodeColumnDesc HashCode to ExprNodeColumnDesc.

@param exprDesc
@param hashCodeToColumnDescMap
ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java