public static ReduceSinkDesc getReduceSinkDesc(
      List<ExprNodeDesc> keyCols, List<ExprNodeDesc> valueCols,
      List<String> outputColumnNames, boolean includeKeyCols, int tag,
      List<ExprNodeDesc> partitionCols, String order, String nullOrder, NullOrdering defaultNullOrder,
      int numReducers, AcidUtils.Operation writeType, boolean isCompaction) {
    ReduceSinkDesc reduceSinkDesc = getReduceSinkDesc(keyCols, keyCols.size(), valueCols,
            new ArrayList<>(),
            includeKeyCols ? outputColumnNames.subList(0, keyCols.size()) :
                    new ArrayList<>(),
            includeKeyCols ? outputColumnNames.subList(keyCols.size(),
                    outputColumnNames.size()) : outputColumnNames,
            includeKeyCols, tag, partitionCols, order, nullOrder, defaultNullOrder, numReducers, writeType);
    reduceSinkDesc.setIsCompaction(isCompaction);
    return reduceSinkDesc;
  }
Create the reduce sink descriptor.

@param keyCols
         The columns to be stored in the key
@param valueCols
         The columns to be stored in the value
@param outputColumnNames
         The output columns names
@param tag
         The tag for this reducesink
@param partitionCols
         The columns for partitioning.
@param numReducers
         The number of reducers, set to -1 for automatic inference based on
         input data size.
@param writeType Whether this is an Acid write, and if so whether it is insert, update,
                 or delete.
@return The reduceSinkDesc object.
ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java