-
Notifications
You must be signed in to change notification settings - Fork 875
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
"or" kernel applied to slices may be invalid on later operations #1498
Comments
Failing test case. I believe the Note that it applies the
|
Maybe a quick fix could be to use |
It looks like that works, and fixes the behavior of |
I don't think it is, as long as both contain enough space for the length of the array where they are used. In the case of primitive arrays, the length of the validity buffer (in bits) would usually also be larger than the number of elements in the data buffer because it gets rounded up to full bytes. |
I believe this is due to #807.
Specifically,
or
usescombine_option_bitmap
which usesbit_slice
to produce the resulting validity bitmap. But this can lead to cases where the null bitmap has an invalid length (corresponding to the original buffer) while the value array has a length corresponding to the slice.This in turn can lead to later problems, such as the
nullif
kernel returning anErr
(internally) when it tries to do a bitwise&
between the validity bits and the value bits, since they aren't the same length. It then discards the results of this comparison (callingok()
instead ofunwrap()
) which leads to correct results.I believe that either (1+2) or (3) should be done:
ok()
with?
to propagate the error.combine_option_bitmap
should to always produce a bitmap of the requested length.nullif
kernel to not fail if the right values and right bitmap have different lengths.Any guidance on which direction the fix should go, and/or ideas on how to implement said fixes?
The text was updated successfully, but these errors were encountered: