public AnalyzeState getExplainAnalyze() {
    if (explainConfig != null) {
      return explainConfig.getAnalyze();
    }
    return null;
  }
Find whether the current query is a logical explain query
ql/src/java/org/apache/hadoop/hive/ql/Context.java