diff --git a/src/array/binary/mod.rs b/src/array/binary/mod.rs index a977c68e323..607e7bd3eae 100644 --- a/src/array/binary/mod.rs +++ b/src/array/binary/mod.rs @@ -97,9 +97,9 @@ impl BinaryArray { /// Sets the validity bitmap on this [`BinaryArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/boolean/mod.rs b/src/array/boolean/mod.rs index d7a868a4654..dfc8134f771 100644 --- a/src/array/boolean/mod.rs +++ b/src/array/boolean/mod.rs @@ -94,9 +94,9 @@ impl BooleanArray { /// Sets the validity bitmap on this [`BooleanArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/dictionary/mod.rs b/src/array/dictionary/mod.rs index 925455b73bd..e938b1e224b 100644 --- a/src/array/dictionary/mod.rs +++ b/src/array/dictionary/mod.rs @@ -85,9 +85,9 @@ impl DictionaryArray { /// Sets the validity bitmap on this [`Array`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/fixed_size_binary/mod.rs b/src/array/fixed_size_binary/mod.rs index cdb385fbfd4..1bd31e6fef6 100644 --- a/src/array/fixed_size_binary/mod.rs +++ b/src/array/fixed_size_binary/mod.rs @@ -96,9 +96,9 @@ impl FixedSizeBinaryArray { /// Sets the validity bitmap on this [`FixedSizeBinaryArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/fixed_size_list/mod.rs b/src/array/fixed_size_list/mod.rs index 7c31589d98d..bc7ae65e025 100644 --- a/src/array/fixed_size_list/mod.rs +++ b/src/array/fixed_size_list/mod.rs @@ -93,9 +93,9 @@ impl FixedSizeListArray { /// Sets the validity bitmap on this [`FixedSizeListArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/list/mod.rs b/src/array/list/mod.rs index 576362a610b..1e84981df86 100644 --- a/src/array/list/mod.rs +++ b/src/array/list/mod.rs @@ -120,9 +120,9 @@ impl ListArray { /// Sets the validity bitmap on this [`ListArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/primitive/mod.rs b/src/array/primitive/mod.rs index 8e14a41e8e7..074047ec35d 100644 --- a/src/array/primitive/mod.rs +++ b/src/array/primitive/mod.rs @@ -96,9 +96,9 @@ impl PrimitiveArray { /// Sets the validity bitmap on this [`PrimitiveArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/struct_.rs b/src/array/struct_.rs index c2cbb8a2094..ddb18724135 100644 --- a/src/array/struct_.rs +++ b/src/array/struct_.rs @@ -119,9 +119,9 @@ impl StructArray { /// Sets the validity bitmap on this [`StructArray`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone(); diff --git a/src/array/utf8/mod.rs b/src/array/utf8/mod.rs index cdd93f8d671..530858c7e25 100644 --- a/src/array/utf8/mod.rs +++ b/src/array/utf8/mod.rs @@ -152,9 +152,9 @@ impl Utf8Array { /// Sets the validity bitmap on this [`Utf8Array`]. /// # Panic - /// This function panics iff `validity.len() < self.len()`. + /// This function panics iff `validity.len() != self.len()`. pub fn with_validity(&self, validity: Option) -> Self { - if matches!(&validity, Some(bitmap) if bitmap.len() < self.len()) { + if matches!(&validity, Some(bitmap) if bitmap.len() != self.len()) { panic!("validity should be as least as large as the array") } let mut arr = self.clone();