@Override
  public Analysis visitExplainAnalyze(
      ExplainAnalyzeStatement explainAnalyzeStatement, MPPQueryContext context) {
    Analysis analysis = visitQuery(explainAnalyzeStatement.getQueryStatement(), context);
    context.setExplainAnalyze(true);
    analysis.setRealStatement(explainAnalyzeStatement);
    analysis.setRespDatasetHeader(
        new DatasetHeader(
            Collections.singletonList(
                new ColumnHeader(ColumnHeaderConstant.EXPLAIN_ANALYZE, TSDataType.TEXT, null)),
            true));
    analysis.setDatabaseName(context.getDatabaseName().orElse(null));
    return analysis;
  }
This visitor is used to analyze each type of Statement and returns the {@link Analysis}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeVisitor.java