-
Notifications
You must be signed in to change notification settings - Fork 208
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
Exclude sign bit from bitpacked encoding if all values are negative #2714
Comments
Hi, I want to tackle this issue. |
Great. I don't think anyone is actively working on this so feel free to create a PR. |
I think there is something wrong with the I tried to set breakpoint inside the The same happens for |
I'm pretty sure, at one point, it did not. We switched from guarding bitpacking with an environment variable ( Also, in related news, @broccoliSpicy has been working on bitpacking as well, to try and utilize the pack/unpack routines in the |
In #2662 we added support for bitpacking signed integers in LanceV2. In #2696, an optimization was made to exclude the sign bit if all the values for a signed type are positive.
We can make a further optimization to exclude the sign bit if all the values are negative.
The way to do this could be to:
lance/protos/encodings.proto
Line 176 in 35e3862
bitpack_params_for_signed_type
add logic to determine if all values are negative, and if so, don't add the sign bit to the number of bits. We can also modify the return typeBitpackParams
as suggested here:lance/rust/lance-encoding/src/encodings/physical/bitpack.rs
Line 79 in b9990d9
lance/rust/lance-encoding/src/encodings/physical/bitpack.rs
Lines 440 to 445 in b9990d9
The text was updated successfully, but these errors were encountered: