presto-main/src/main/java/io/prestosql/operator/aggregation/state/QuantileDigestStateSerializer.java/QuantileDigestStateSerializer/serialize
class QuantileDigestStateSerializer:    @Override
    public void serialize(QuantileDigestState state, BlockBuilder out)
    {
        if (state.getQuantileDigest() == null) {
            out.appendNull();
        }
        else {
            type.writeSlice(out, state.getQuantileDigest().serialize());
        }
    }