private static boolean areSupportedDppUnionOps(ParseContext pctx, SharedWorkOptimizerCache cache, TableScanOperator tsOp1,
      TableScanOperator tsOp2) {
    Collection<Operator<?>> dppOps = cache.tableScanToDPPSource.get(tsOp1);
    if (dppOps.isEmpty()) {
      return false;
    }
    for (Operator<?> op : dppOps) {
      if (op instanceof ReduceSinkOperator) {
        ReduceSinkOperator semijoinRSOp = (ReduceSinkOperator) op;
        if (pctx.getRsToSemiJoinBranchInfo().get(semijoinRSOp).getIsHint()) {
          // This is a hint, we should keep it, hence we bail out
          return false;
        }
      } else if (op.getConf() instanceof DynamicPruningEventDesc) {
        if (!pctx.getConf().getBoolVar(ConfVars.HIVE_SHARED_WORK_DPPUNION_MERGE_EVENTOPS)) {
          return false;
        }
      } else {
        return false;
      }
    }
    return true;
  }
Orders TS operators in decreasing order by "weight".
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SharedWorkOptimizer.java