tustvold commented on code in PR #2693:
URL: https://github.com/apache/arrow-rs/pull/2693#discussion_r966658900


##########
arrow/src/compute/kernels/boolean.rs:
##########
@@ -507,33 +502,31 @@ where
     //
     // Do the right expression !(right_values & right_bitmap) first since 
there are two steps
     // TRICK: convert BooleanArray buffer as a bitmap for faster operation
-    let right_combo_buffer = match right.data().null_bitmap() {
+    let rcb = match right.data().null_bitmap() {
         Some(right_bitmap) => {
-            // NOTE: right values and bitmaps are combined and stay at bit 
offset right.offset()
-            (right.values() & &right_bitmap.bits).ok().map(|b| b.not())
+            let and = buffer_bin_and(

Review Comment:
   This logic is not only simpler now, but avoids performing work on values 
past the offset



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to