@Override
  protected void serializeAttributes(DataOutputStream stream) throws IOException {
    PlanNodeType.TABLE_AGGREGATION_NODE.serialize(stream);
    ReadWriteIOUtils.write(aggregations.size(), stream);
    for (Map.Entry<Symbol, Aggregation> aggregation : aggregations.entrySet()) {
      Symbol.serialize(aggregation.getKey(), stream);
      aggregation.getValue().serialize(stream);
    }
    groupingSets.serialize(stream);
    ReadWriteIOUtils.write(preGroupedSymbols.size(), stream);
    for (Symbol preGroupedSymbol : preGroupedSymbols) {
      Symbol.serialize(preGroupedSymbol, stream);
    }
    step.serialize(stream);
    ReadWriteIOUtils.write(hashSymbol.isPresent(), stream);
    if (hashSymbol.isPresent()) {
      Symbol.serialize(hashSymbol.get(), stream);
    }
    ReadWriteIOUtils.write(groupIdSymbol.isPresent(), stream);
    if (groupIdSymbol.isPresent()) {
      Symbol.serialize(groupIdSymbol.get(), stream);
    }
  }
@return whether this node should produce default output in case of no input pages. For example
    for query:
    <p>SELECT count(*) FROM nation WHERE nationkey < 0
    <p>A default output of "0" is expected to be produced by FINAL aggregation operator.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/node/AggregationNode.java