From ffbf82a7c300be8b58f8922f9b79702c490ab743 Mon Sep 17 00:00:00 2001 From: Ritchie Vink Date: Thu, 2 Dec 2021 10:23:42 +0100 Subject: [PATCH] update documentation on null behavior --- src/compute/filter.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compute/filter.rs b/src/compute/filter.rs index c960626fb63..403df3e0f73 100644 --- a/src/compute/filter.rs +++ b/src/compute/filter.rs @@ -111,8 +111,10 @@ pub fn build_filter(filter: &BooleanArray) -> Result { } /// Filters an [Array], returning elements matching the filter (i.e. where the values are true). -/// WARNING: the nulls of `filter` are ignored and the value on its slot is considered. -/// Therefore, it is considered undefined behavior to pass `filter` with null values. +/// +/// Note that the nulls of `filter` are interpreted as `false` will lead to these elements being +/// masked out. +/// /// # Example /// ```rust /// # use arrow2::array::{Int32Array, PrimitiveArray, BooleanArray};