public boolean getExplainLogical() {
    return explainConfig != null && explainConfig.isLogical();
  }
Find whether the current query is a logical explain query
ql/src/java/org/apache/hadoop/hive/ql/Context.java