presto-main/src/main/java/io/prestosql/operator/aggregation/arrayagg/ArrayAggregationStateSerializer.java/ArrayAggregationStateSerializer/serialize
class ArrayAggregationStateSerializer:    @Override
    public void serialize(ArrayAggregationState state, BlockBuilder out)
    {
        if (state.isEmpty()) {
            out.appendNull();
        }
        else {
            BlockBuilder entryBuilder = out.beginBlockEntry();
            state.forEach((block, position) -> elementType.appendTo(block, position, entryBuilder));
            out.closeEntry();
        }
    }