You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/16 14:01:53 UTC

[GitHub] [arrow-rs] ritchie46 commented on a change in pull request #296: fix invalid null handling in filter

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



##########
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:
       Good catch. 




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