presto-main/src/main/java/io/prestosql/operator/aggregation/state/BlockStateSerializer.java/BlockStateSerializer/deserialize
class BlockStateSerializer:    @Override
    public void deserialize(Block block, int index, BlockState state)
    {
        state.setBlock((Block) type.getObject(block, index));
    }