-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
I believe this is due to #807.
Specifically, or uses combine_option_bitmap which uses bit_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 an Err (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 (calling ok() instead of unwrap()) which leads to correct results.
(right.values() & &right_bitmap.bits).ok().map(|b| b.not())
I believe that either (1+2) or (3) should be done:
- Replace the
ok()with?to propagate the error. - Change
combine_option_bitmapshould to always produce a bitmap of the requested length. - Change the logic within the
nullifkernel 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?