@Override
  public TsBlock buildResult() {
    // used for order by in Agg
    /*for (GroupedAggregator groupedAggregator : groupedAggregators) {
      groupedAggregator.prepareFinal();
    }*/
    return buildResult(consecutiveGroupIds());
  }
building hash sorted results requires memory for sorting group IDs. This method returns size of
that memory requirement.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/aggregation/grouped/builder/InMemoryHashAggregationBuilder.java