private KeyValueReader getKeyValueReader(Collection<KeyValueReader> keyValueReaders,
      AbstractMapOperator mapOp) throws Exception {
    List<KeyValueReader> kvReaderList = new ArrayList<KeyValueReader>(keyValueReaders);
    // this sets up the map operator contexts correctly
    mapOp.initializeContexts();
    Deserializer deserializer = mapOp.getCurrentDeserializer();
    // deserializer is null in case of VectorMapOperator
    KeyValueReader reader =
      new KeyValueInputMerger(kvReaderList, deserializer,
          new ObjectInspector[] { deserializer == null ? null : deserializer.getObjectInspector() }, mapOp
          .getConf()
          .getSortCols());
    return reader;
  }
Process input from tez LogicalInput and write output - for a map plan
Just pump the records through the query plan.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/MapRecordProcessor.java