-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BitSet.bitand operation returns non-empty BitSetAnd even if no ids match. #51
Comments
Currently using hibitset version 0.6.1. |
https://github.com/prixt/hibitset/blob/master/src/ops.rs A band-aid fix. Basically created a separate 'is_empty' function for BitSetAnd.
There probably is a better solution, but this will fix the problem for now. |
Argh, this is a severe bug in our operators! We can not simply AND / XOR layers 1 - 3; they need to be recomputed. |
This essentially means we'll likely have to drop our "lazy" operators and rely exclusively on |
https://github.com/prixt/hibitset/blob/and_xor_assign/src/ops.rs Tried to create new BitSetAnd and BitSetXor structs. While these do pass the tests, I think these won't work in all cases, since they internally use BitSet. |
Should we also do eager calculation of |
Yeah this pretty much forces dropping lazy operators. |
|
If all operators need to create a new BitSetLike structure, and now need to be recalculated, why not just return a BitSet? |
Am I correct in thinking this means the bitsets simply return incorrect answers?? This crate has been downloaded more than 400,000 times, so if its logic is incorrect it should really get pulled! |
This bug has three implications as far as I see it:
|
Code:
Output:
The text was updated successfully, but these errors were encountered: