@Override
    protected Scope visitTableSubquery(TableSubquery node, Optional<Scope> scope) {
      StatementAnalyzer analyzer =
          statementAnalyzerFactory.createStatementAnalyzer(
              analysis, queryContext, sessionContext, warningCollector, CorrelationSupport.ALLOWED);
      analyzer.hasFillInParentScope = hasFillInParentScope;
      Scope queryScope =
          analyzer.analyze(
              node.getQuery(),
              scope.orElseThrow(() -> new NoSuchElementException("No value present")));
      return createAndAssignScope(node, scope, queryScope.getRelationType());
    }
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