private void LVmergeRowResolvers(RowResolver source, RowResolver dest,
                                   Map<String, ExprNodeDesc> colExprMap, List<String> outputInternalColNames) {
    for (ColumnInfo c : source.getColumnInfos()) {
      String internalName = getColumnInternalName(outputInternalColNames.size());
      outputInternalColNames.add(internalName);
      ColumnInfo newCol = new ColumnInfo(internalName, c.getType(), c
          .getTabAlias(), c.getIsVirtualCol(), c.isHiddenVirtualCol());
      String[] tableCol = source.reverseLookup(c.getInternalName());
      String tableAlias = tableCol[0];
      String colAlias = tableCol[1];
      dest.put(tableAlias, colAlias, newCol);
      colExprMap.put(internalName, new ExprNodeColumnDesc(c));
    }
  }
A helper function that gets all the columns and respective aliases in the
source and puts them into dest. It renames the internal names of the
columns based on getColumnInternalName(position).

Note that this helper method relies on RowResolver.getColumnInfos()
returning the columns in the same order as they will be passed in the
operator DAG.

@param source
@param dest
@param colExprMap
@param outputInternalColNames
         - a list to which the new internal column names will be added, in
         the same order as in the dest row resolver
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java