public static ExpressionAnalysis analyzeExpressions(
      Metadata metadata,
      MPPQueryContext context,
      SessionInfo session,
      StatementAnalyzerFactory statementAnalyzerFactory,
      AccessControl accessControl,
      TypeProvider types,
      Iterable<Expression> expressions,
      Map<NodeRef<Parameter>, Expression> parameters,
      WarningCollector warningCollector) {
    Analysis analysis = new Analysis(null, parameters);
    analysis.setDatabaseName(session.getDatabaseName().get());
    ExpressionAnalyzer analyzer =
        new ExpressionAnalyzer(
            metadata,
            context,
            accessControl,
            statementAnalyzerFactory,
            analysis,
            session,
            types,
            warningCollector);
    for (Expression expression : expressions) {
      analyzer.analyze(
          expression,
          Scope.builder().withRelationType(RelationId.anonymous(), new RelationType()).build());
    }

    return new ExpressionAnalysis(
        analyzer.getExpressionTypes(),
        analyzer.getSubqueryInPredicates(),
        analyzer.getSubqueries(),
        analyzer.getExistsSubqueries(),
        analyzer.getColumnReferences(),
        analyzer.getQuantifiedComparisons(),
        analyzer.getWindowFunctions());
  }
@return the common supertype between the value type and subquery type
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/ExpressionAnalyzer.java