public void evaluateIntermediate(int groupId, BlockBuilder output)
{
Block[] blocks = new Block[accumulators.size()];
int sizeEstimate = 64 * accumulators.size();
for (int i = 0; i < accumulators.size(); i++) {
BlockBuilder builder = new BlockBuilder(accumulators.get(i).getIntermediateTupleInfo());
accumulators.get(i).evaluateIntermediate(groupId, builder);
blocks[i] = builder.build();
sizeEstimate += blocks[i].getDataSize().toBytes();
}
SliceOutput sliceOutput = new DynamicSliceOutput(sizeEstimate);
PagesSerde.writePages(sliceOutput, new Page(blocks));