jhorstmann commented on a change in pull request #7854:
URL: https://github.com/apache/arrow/pull/7854#discussion_r461660110



##########
File path: rust/arrow/src/compute/kernels/boolean.rs
##########
@@ -53,13 +53,18 @@ where
         right_data.null_bitmap(),
         |a, b| a & b,
     )?;
-    let values = op(&left_data.buffers()[0], &right_data.buffers()[0])?;
+    let left_buffer = &left_data.buffers()[0];
+    let right_buffer = &right_data.buffers()[0];
+    let values = op(
+        &left_buffer.slice(left_data.offset() / 8),

Review comment:
       This part does not work yet in all cases since we also need to take the 
length of the array data into account, which might be less than the buffer 
length.

##########
File path: rust/arrow/src/compute/kernels/boolean.rs
##########
@@ -53,13 +53,18 @@ where
         right_data.null_bitmap(),
         |a, b| a & b,
     )?;
-    let values = op(&left_data.buffers()[0], &right_data.buffers()[0])?;
+    let left_buffer = &left_data.buffers()[0];
+    let right_buffer = &right_data.buffers()[0];
+    let values = op(
+        &left_buffer.slice(left_data.offset() / 8),

Review comment:
       This part does not work yet in all cases since we also need to take the 
length of the array data into account, which might be less than the buffer 
length. See testcase `test_bool_array_and_sliced_same_offset_mod8` 




----------------------------------------------------------------
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.

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


Reply via email to