public static ExpressionAnalysis analyzePatternRecognitionExpression(
      Metadata metadata,
      MPPQueryContext context,
      SessionInfo session,
      StatementAnalyzerFactory statementAnalyzerFactory,
      AccessControl accessControl,
      Scope scope,
      Analysis analysis,
      Expression expression,
      WarningCollector warningCollector,
      // labels are all the pattern variables defined in the context of RPR
      Set<String> labels) {
    ExpressionAnalyzer analyzer =
        new ExpressionAnalyzer(
            metadata,
            context,
            accessControl,
            statementAnalyzerFactory,
            analysis,
            session,
            TypeProvider.empty(),
            warningCollector);
    analyzer.analyze(expression, scope, labels);

    updateAnalysis(analysis, analyzer, session, accessControl);

    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