presto-main/src/main/java/io/prestosql/operator/aggregation/TypedHeap.java/TypedHeap/writeAll
class TypedHeap:    public void writeAll(BlockBuilder resultBlockBuilder)
    {
        for (int i = 0; i < positionCount; i++) {
            type.appendTo(heapBlockBuilder, heapIndex[i], resultBlockBuilder);
        }
    }