public static void verifyOrderByAggregations(
      List<Expression> groupByExpressions,
      Scope sourceScope,
      Scope orderByScope,
      List<Expression> expressions,
      Analysis analysis) {
    AggregationAnalyzer analyzer =
        new AggregationAnalyzer(
            groupByExpressions, sourceScope, Optional.of(orderByScope), analysis);
    for (Expression expression : expressions) {
      analyzer.analyze(expression);
    }
  }
Checks whether an expression is constant with respect to the group
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AggregationAnalyzer.java