notfilippo opened a new pull request, #117:
URL: https://github.com/apache/datasketches-rust/pull/117

   When an `HllSketch` in **List mode** is serialized it uses compact format: 
only the live coupons are written to disk, with no trailing `COUPON_EMPTY` 
sentinels. On deserialization, the container was allocated with exactly 
`coupon_count` slots, leaving the array fully packed.
   
   `list::update()` scans linearly for a `COUPON_EMPTY` (`0`) sentinel to find 
an insertion slot. Finding none, it fell through silently — discarding every 
value added after the round-trip.
   
   Always allocate `1 << lg_arr` slots (initialized to `COUPON_EMPTY`) in 
`List::deserialize()`, reading only `coupon_count` elements from the byte 
stream in compact mode. The trailing empty slots are then available as 
sentinels for subsequent `update()` calls.
   
   Fixes #115.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to