protected static String getColumnName(
      Map<String, ExprNodeDesc> opColumnExprMap, ExprNodeDesc expr) {
    for (Entry<String, ExprNodeDesc> entry : opColumnExprMap.entrySet()) {
      ExprNodeDesc thisExpr = entry.getValue();
      if (thisExpr != null && thisExpr.isSame(expr)) {
        return entry.getKey();
      }
    }
    return null;
  }
Utilities for both CorrelationOptimizer and ReduceSinkDeDuplication.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/CorrelationUtilities.java