presto-main/src/main/java/io/prestosql/operator/aggregation/multimapagg/MultimapAggregationStateSerializer.java/MultimapAggregationStateSerializer/serialize
class MultimapAggregationStateSerializer:    @Override
    public void serialize(MultimapAggregationState state, BlockBuilder out)
    {
        if (state.isEmpty()) {
            out.appendNull();
            return;
        }
        BlockBuilder entryBuilder = out.beginBlockEntry();
        state.forEach((keyBlock, valueBlock, position) -> {
            BlockBuilder rowBlockBuilder = entryBuilder.beginBlockEntry();
            valueType.appendTo(valueBlock, position, rowBlockBuilder);
            keyType.appendTo(keyBlock, position, rowBlockBuilder);
            entryBuilder.closeEntry();
        });
        out.closeEntry();
    }