private void enrichFromPerfLogger(Record record) {
    record.setPlanningDuration(perfLogger.getEndTime(PerfLogger.COMPILE) - perfLogger.getStartTime(PerfLogger.COMPILE));
    record.setPlanningStartTime(perfLogger.getStartTime(PerfLogger.COMPILE));

    record.setPreparePlanDuration(perfLogger.getPreparePlanDuration());
    record.setPreparePlanStartTime(perfLogger.getEndTime(PerfLogger.COMPILE));

    record.setGetSessionDuration(perfLogger.getDuration(PerfLogger.TEZ_GET_SESSION));
    record.setGetSessionStartTime(perfLogger.getStartTime(PerfLogger.TEZ_GET_SESSION));

    record.setExecutionDuration(perfLogger.getRunDagDuration());
    record.setExecutionStartTime(perfLogger.getStartTime(PerfLogger.TEZ_RUN_DAG));
  }
With query history, a more detailed HiveOperation-based query classification is introduced without breaking the
original one. If there is an SqlKind stored in the QueryState, the record will contain it.
ql/src/java/org/apache/hadoop/hive/ql/queryhistory/RecordEnricher.java