@Override
    public Boolean process(Node node, @Nullable Void context) {
      if (node instanceof Expression
          && expressions.contains(scopeAwareKey(node, analysis, sourceScope))
          && (!orderByScope.isPresent() || !hasOrderByReferencesToOutputColumns(node))) {
        return true;
      }

      return super.process(node, context);
    }
visitor returns true if all expressions are constant with respect to the group.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/AggregationAnalyzer.java