private void addJoinKeyToRowSchema(
      RowResolver outputRR, int[] index, int i, ColumnInfo colInfo, String[] nm, String[] nm2, int kindex) {
    ColumnInfo newColInfo = new ColumnInfo(colInfo);
    String internalColName = ReduceField.KEY + ".reducesinkkey" + kindex;
    newColInfo.setInternalName(internalColName);
    newColInfo.setTabAlias(nm[0]);
    outputRR.put(nm[0], nm[1], newColInfo);
    if (nm2 != null) {
      outputRR.addMappingOnly(nm2[0], nm2[1], newColInfo);
    }
    index[i] = kindex;
  }
Creates an expression for converting from a table column to a row column. For example:
The table column is int but the query provides a string in the row, then we need to cast automatically.
@param tableField The target table column
@param rowField The source row column
@param conversion The value of this boolean is set to true if we detect that a conversion is needed. This is a
                  hidden return value hidden here, to notify the caller that a cast was needed.
@param dest The destination table for the error message
@param columnNum The destination column id for the error message
@return The Expression describing the selected column. Note that `conversion` can be considered as a return value
        as well
@throws SemanticException If conversion were needed, but automatic conversion is not available
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java