public static void runOnDriver(HiveConf conf, SessionState sessionState, String query) throws HiveException {
    runOnDriverInternal(query, conf, sessionState, Driver::new);
  }
For Query Based compaction to run the query to generate the compacted data.
ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java