@Override
    protected Boolean visitDereferenceExpression(DereferenceExpression node, Void context) {

      if (!hasReferencesToScope(node, analysis, sourceScope)) {
        // reference to outer scope is group-invariant
        return true;
      }

      if (columnReferences.containsKey(NodeRef.<Expression>of(node))) {
        return isGroupingKey(node);
      }

      // Allow SELECT col1.f1 FROM table1 GROUP BY col1
      return process(node.getBase(), 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