Closed tatyana-322 closed 3 months ago
Looks like a bug. :-/
Yes. It is a bug.
We will issue a patch release soon.
Please update to the latest version.
@lemire after patch it works for case a.AddMany([]uint32{1, 2, 3})
, but if you check same test but with a.AddMany([]uint32{1, 2, 3, 4})
- it will fail. I've checked similar sequences up to 10000, test fails for 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
@tatyana-322 Thanks. The fix was not complete. I am issuing a new release.
@lemire on latest update (2.3.3) it started to fail on similar sequences ending with x >= 14
: {1..14}
; {1..15}
; ... ; {1..10000}
; ...
@tatyana-322 You are correct.
In the cases below,
.RunOptimize()
always changes container fromrunContainer16{iv:interval16}
toarrayContainer
. If applied again, it will changearrayContainer
back torunContainer16{iv:interval16}
and so on.My encoding workflow always calls
.RunOptimize()
before.MarshalBinary()
..MarshalBinary()
result differs forarrayContainer
and forrunContainer16{iv:interval16}
. Therefore, on EACH encoding workflow call, binary result will be different for the same contents in bitmap.Do you mind to make .RunOptimize() idempotent ?
Case 1 with
github.com/RoaringBitmap/roaring/v2 v2.3.1
:Case 2 with
github.com/RoaringBitmap/roaring v1.9.4
: