private static boolean deterministicIntersection(List<ExprNodeDesc> li1, List<ExprNodeDesc> li2) {
    for (ExprNodeDesc e1 : li1) {
      if (!isDeterministic(e1)) {
        continue;
      }
      for (ExprNodeDesc e2 : li2) {
        if (e1.isSame(e2)) {
          return true;
        }
      }
    }
    return false;
  }
Checks wether the two expression sets have a common deterministic intersection.
ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java