@Override
    public PlanNode visitAggregation(AggregationNode node, Void context) {
      node.getChild().accept(this, context);
      Set<Symbol> expectedGroupingKeys = ImmutableSet.copyOf(node.getGroupingKeys());
      node.setPreGroupedSymbols(
          node.getChild()
              .accept(new DeriveGroupProperties(), new GroupContext(expectedGroupingKeys)));
      return node;
    }
<b>Optimization phase:</b> Logical plan planning.

<p>Calculate the preGroupedSymbols in {@link AggregationNode}, used in {@link
AggregationNode#isStreamable()}.

<p>Attention: This optimizer should be used before optimizer of {@link
PushAggregationIntoTableScan}.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/TransformAggregationToStreamable.java