private Analysis finishQuery(
      QueryStatement queryStatement,
      Analysis analysis,
      List<Pair<Expression, String>> outputExpressions) {
    analyzeOutput(analysis, queryStatement, outputExpressions);
    analysis.setFinishQueryAfterAnalyze(true);
    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