private void removeOneEdge(List<Pair<Operator<?>, Operator<?>>> values) {
    Pair<Operator<?>, Operator<?>> toKeep = null;
    for (Pair<Operator<?>, Operator<?>> pair : values) {
      if (!isParallelEdgeSupported(pair)) {
        if (toKeep != null) {
          throw new RuntimeException("More than one operators which may not reshuffled!");
        }
        toKeep = pair;
      }
    }
    if (toKeep == null) {
      toKeep = values.get(values.size() - 1);
    }
    values.remove(toKeep);
  }
To achieve reproducible plans - the operators must be placed in some stable order.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ParallelEdgeFixer.java