private boolean shouldBeRootTask(
      Task<?> currTask) {
    return currTask.getParentTasks() == null
        || (currTask.getParentTasks().size() == 0);
  }
Union Operator encountered . Currently, the algorithm is pretty simple: If
all the sub-queries are map-only, don't do anything. Otherwise, insert a
FileSink on top of all the sub-queries.

This can be optimized later on.

@param nd
         the file sink operator encountered
@param opProcCtx
         context
ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMRUnion1.java