protected static RowResolver buildRowResolverForPTF(String tbFnName, String tabAlias,
      StructObjectInspector rowObjectInspector,
      List<String> outputColNames, RowResolver inputRR) throws SemanticException {

    if (FunctionRegistry.isNoopFunction(tbFnName)) {
      return buildRowResolverForNoop(tabAlias, rowObjectInspector, inputRR);
    }

    RowResolver rwsch = new RowResolver();
    List<? extends StructField> fields = rowObjectInspector.getAllStructFieldRefs();
    for (int i = 0; i < fields.size(); i++) {
      ColumnInfo colInfo = new ColumnInfo(fields.get(i).getFieldName(),
          TypeInfoUtils.getTypeInfoFromObjectInspector(fields.get(i)
              .getFieldObjectInspector()),
          tabAlias,
          false);
      rwsch.put(tabAlias, outputColNames.get(i), colInfo);
    }
    return rwsch;
  }
For each column on the input RR, construct a StructField for it
OI is constructed using the list of input column names and
their corresponding OIs.

@param rr
@return
ql/src/java/org/apache/hadoop/hive/ql/parse/PTFTranslator.java