presto-main/src/main/java/io/prestosql/operator/aggregation/state/SliceState.java/SliceState/write
class SliceState:    static void write(Type type, SliceState state, BlockBuilder out)
    {
        if (state.getSlice() == null) {
            out.appendNull();
        }
        else {
            type.writeSlice(out, state.getSlice());
        }
    }