void setInputFormatForMapWork(BaseWork work) {
    if (work instanceof MapWork) {
      MapWork mapWork = (MapWork) work;
      Map<String, Operator<? extends OperatorDesc>> opMap = mapWork.getAliasToWork();
      if (!opMap.isEmpty()) {
        for (Operator<? extends OperatorDesc> op : opMap.values()) {
          setInputFormat(mapWork, op);
        }
      }
    }
  }
TezCompiler translates the operator plan into TezTasks.
ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java