private void analyzeWindow(
        QuerySpecification querySpecification,
        Analysis.ResolvedWindow window,
        Scope scope,
        Node originalNode) {
      ExpressionAnalysis expressionAnalysis =
          ExpressionAnalyzer.analyzeWindow(
              metadata,
              sessionContext,
              queryContext,
              statementAnalyzerFactory,
              accessControl,
              scope,
              analysis,
              WarningCollector.NOOP,
              correlationSupport,
              window,
              originalNode);
      analysis.recordSubqueries(querySpecification, expressionAnalysis);
    }
Visitor context represents local query scope (if exists). The invariant is that the local query
scopes hierarchy should always have outer query scope (if provided) as ancestor.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java