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



##########
File path: rust/arrow/src/compute/util.rs
##########
@@ -71,6 +71,47 @@ pub(super) fn combine_option_bitmap(
     }
 }
 
+/// Compares the null bitmaps of two arrays using a bitwise `or` operation.
+///
+/// This function is useful when implementing operations on higher level 
arrays.
+pub(super) fn compare_option_bitmap(
+    left_data: &ArrayDataRef,
+    right_data: &ArrayDataRef,
+    len_in_bits: usize,
+) -> Result<Option<Buffer>> {
+    let left_offset_in_bits = left_data.offset();
+    let right_offset_in_bits = right_data.offset();
+
+    let left = left_data.null_buffer();
+    let right = right_data.null_buffer();
+
+    if (left.is_some() && left_offset_in_bits % 8 != 0)

Review comment:
       I'm trying to solve this problem in #8262 
   
   The issue is that `buffer.slice` and `buffer_bin_or/and` currently work with 
byte offsets, but for boolean arrays and bitmaps the offset can start in the 
middle of a byte.




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