public static void disjunctiveDecomposition(ExprNodeDesc expr, List<ExprNodeDesc> operands) {
    if (isOr(expr)) {
      for (ExprNodeDesc c : expr.getChildren()) {
        disjunctiveDecomposition(c, operands);
      }
    } else {
      for (ExprNodeDesc o : operands) {
        if (o.isSame(expr)) {
          return;
        }
      }
      operands.add(expr);
    }
  }
Checks wether the two expression sets have a common deterministic intersection.
ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java