private void parse() throws ParseException {
    perfLogger.perfLogBegin(CLASS_NAME, PerfLogger.PARSE);

    // Trigger query hook before compilation
    driverContext.getHookRunner().runBeforeParseHook(context.getCmd());

    boolean success = false;
    try {
      tree = ParseUtils.parse(context.getCmd(), context);
      success = true;
    } finally {
      driverContext.getHookRunner().runAfterParseHook(context.getCmd(), !success);
    }
    perfLogger.perfLogEnd(CLASS_NAME, PerfLogger.PARSE);
  }
@param deferClose indicates if the close/destroy should be deferred when the process has been interrupted
            it should be set to true if the compile method is called within another method like runInternal,
            which defers the close to the called in that method.
ql/src/java/org/apache/hadoop/hive/ql/Compiler.java