From 8ab2ff244b9bb2f2ed6f0c895c932296a58d58c3 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 12:02:21 -0400 Subject: [PATCH 1/3] fix Signed-off-by: Joe Isaacs --- vortex-array/src/arrow/record_batch.rs | 2 +- vortex-array/src/validity.rs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vortex-array/src/arrow/record_batch.rs b/vortex-array/src/arrow/record_batch.rs index 02ec62f626a..75000b1b31c 100644 --- a/vortex-array/src/arrow/record_batch.rs +++ b/vortex-array/src/arrow/record_batch.rs @@ -29,7 +29,7 @@ impl TryFrom<&ArrayRef> for RecordBatch { }; vortex_ensure!( - matches!(struct_array.validity()?, Validity::AllValid), + struct_array.validity()?.no_nulls(), "RecordBatch can only be constructed from StructArray with no nulls" ); diff --git a/vortex-array/src/validity.rs b/vortex-array/src/validity.rs index cb261a9b0b2..84586754dcf 100644 --- a/vortex-array/src/validity.rs +++ b/vortex-array/src/validity.rs @@ -112,6 +112,13 @@ impl Validity { } } + /// Returns `true` if this validity guarantees no null values, i.e. it is either + /// [`Validity::NonNullable`] or [`Validity::AllValid`]. + #[inline] + pub fn no_nulls(&self) -> bool { + matches!(self, Self::NonNullable | Self::AllValid) + } + /// The union nullability and validity. #[inline] pub fn union_nullability(self, nullability: Nullability) -> Self { From b96c6bf8425143639906626cd139b08d85385717 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 12:09:20 -0400 Subject: [PATCH 2/3] fix Signed-off-by: Joe Isaacs --- vortex-array/src/arrow/record_batch.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/vortex-array/src/arrow/record_batch.rs b/vortex-array/src/arrow/record_batch.rs index 75000b1b31c..3163e967ca3 100644 --- a/vortex-array/src/arrow/record_batch.rs +++ b/vortex-array/src/arrow/record_batch.rs @@ -17,7 +17,6 @@ use crate::VortexSessionExecute; use crate::array::IntoArray; use crate::arrays::StructArray; use crate::arrow::ArrowArrayExecutor; -use crate::validity::Validity; // deprecated(note = "Use ArrowArrayExecutor::execute_record_batch instead") impl TryFrom<&ArrayRef> for RecordBatch { From 9edc0e651ab9f64d62a5121855e66c864c98d094 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 13:33:15 -0400 Subject: [PATCH 3/3] fix Signed-off-by: Joe Isaacs --- vortex-array/public-api.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vortex-array/public-api.lock b/vortex-array/public-api.lock index f5b0adb4f2c..dced3a9f4a7 100644 --- a/vortex-array/public-api.lock +++ b/vortex-array/public-api.lock @@ -19038,6 +19038,8 @@ pub fn vortex_array::validity::Validity::mask_eq(&self, other: &vortex_array::va pub fn vortex_array::validity::Validity::maybe_len(&self) -> core::option::Option +pub fn vortex_array::validity::Validity::no_nulls(&self) -> bool + pub fn vortex_array::validity::Validity::not(&self) -> vortex_error::VortexResult pub fn vortex_array::validity::Validity::nullability(&self) -> vortex_array::dtype::Nullability