private void analyzeWindowFunctionsAndMeasures(
        QuerySpecification node,
        List<Expression> outputExpressions,
        List<Expression> orderByExpressions) {
      analysis.setWindowFunctions(node, analyzeWindowFunctions(node, outputExpressions));
      if (node.getOrderBy().isPresent()) {
        OrderBy orderBy = node.getOrderBy().get();
        analysis.setOrderByWindowFunctions(
            orderBy, analyzeWindowFunctions(node, orderByExpressions));
      }
    }
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