jhorstmann commented on a change in pull request #296:
URL: https://github.com/apache/arrow-rs/pull/296#discussion_r633093885



##########
File path: arrow/src/compute/kernels/filter.rs
##########
@@ -221,6 +223,23 @@ pub fn build_filter(filter: &BooleanArray) -> 
Result<Filter> {
 /// # }
 /// ```
 pub fn filter(array: &Array, filter: &BooleanArray) -> Result<ArrayRef> {
+    if filter.null_count() > 0 {
+        // this greatly simplifies subsequent filtering code
+        // now we only have a boolean mask to deal with
+        let array_data = filter.data_ref();
+        let null_bitmap = array_data.null_buffer().unwrap();

Review comment:
       I think this needs to take the offset of the array into account, similar 
to https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/util.rs#L45




-- 
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:
us...@infra.apache.org


Reply via email to