From 0e1d4df0e9477cbe88b370eefe52972b7176b3d6 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Thu, 12 Mar 2026 16:54:31 +0000 Subject: [PATCH 1/3] Add FixedSizedList to Arbitrary DType implementation Signed-off-by: Robert Kruszewski --- vortex-array/src/dtype/arbitrary/mod.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vortex-array/src/dtype/arbitrary/mod.rs b/vortex-array/src/dtype/arbitrary/mod.rs index 3711b904472..c40c0c7266d 100644 --- a/vortex-array/src/dtype/arbitrary/mod.rs +++ b/vortex-array/src/dtype/arbitrary/mod.rs @@ -2,6 +2,7 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use std::sync::Arc; +use vortex_error::VortexExpect; use arbitrary::Arbitrary; use arbitrary::Result; @@ -34,8 +35,7 @@ impl<'a> Arbitrary<'a> for FieldName { fn random_dtype(u: &mut Unstructured<'_>, depth: u8) -> Result { const BASE_TYPE_COUNT: i32 = 5; - // TODO(joe): update to 3 once fsl works - const CONTAINER_TYPE_COUNT: i32 = 2; + const CONTAINER_TYPE_COUNT: i32 = 3; let max_dtype_kind = if depth == 0 { BASE_TYPE_COUNT } else { @@ -52,12 +52,12 @@ fn random_dtype(u: &mut Unstructured<'_>, depth: u8) -> Result { // container types 6 => DType::Struct(random_struct_dtype(u, depth - 1)?, u.arbitrary()?), 7 => DType::List(Arc::new(random_dtype(u, depth - 1)?), u.arbitrary()?), - // 8 => DType::FixedSizeList( - // Arc::new(random_dtype(u, depth - 1)?), - // // We limit the list size to 3 rather (following random struct fields). - // u.choose_index(3)?.try_into().vortex_expect("impossible"), - // u.arbitrary()?, - // ), + 8 => DType::FixedSizeList( + Arc::new(random_dtype(u, depth - 1)?), + // We limit the list size to 3 rather (following random struct fields). + u.choose_index(3)?.try_into().vortex_expect("impossible"), + u.arbitrary()?, + ), // Null, // Extension(ExtDType, Nullability), _ => unreachable!("Number out of range"), From 575a8a38be649c1aba6c3e1ed68f53b16db51cfe Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Thu, 12 Mar 2026 16:56:38 +0000 Subject: [PATCH 2/3] format Signed-off-by: Robert Kruszewski --- vortex-array/src/dtype/arbitrary/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vortex-array/src/dtype/arbitrary/mod.rs b/vortex-array/src/dtype/arbitrary/mod.rs index c40c0c7266d..a0afbbb3c26 100644 --- a/vortex-array/src/dtype/arbitrary/mod.rs +++ b/vortex-array/src/dtype/arbitrary/mod.rs @@ -2,11 +2,11 @@ // SPDX-FileCopyrightText: Copyright the Vortex contributors use std::sync::Arc; -use vortex_error::VortexExpect; use arbitrary::Arbitrary; use arbitrary::Result; use arbitrary::Unstructured; +use vortex_error::VortexExpect; use crate::dtype::DType; use crate::dtype::DecimalDType; From 392e24b026ba7d447d6dcbd146e83eeb64442ae0 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Thu, 12 Mar 2026 17:01:15 +0000 Subject: [PATCH 3/3] newmethod Signed-off-by: Robert Kruszewski --- .../src/arrow/executor/fixed_size_list.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/vortex-array/src/arrow/executor/fixed_size_list.rs b/vortex-array/src/arrow/executor/fixed_size_list.rs index 6da7c40aa58..9031ebadb03 100644 --- a/vortex-array/src/arrow/executor/fixed_size_list.rs +++ b/vortex-array/src/arrow/executor/fixed_size_list.rs @@ -55,10 +55,13 @@ fn list_to_list( let null_buffer = to_arrow_null_buffer(array.validity().clone(), array.len(), ctx)?; - Ok(Arc::new(arrow_array::FixedSizeListArray::new( - elements_field.clone(), - list_size, - elements, - null_buffer, - ))) + Ok(Arc::new( + arrow_array::FixedSizeListArray::try_new_with_length( + elements_field.clone(), + list_size, + elements, + null_buffer, + array.len(), + )?, + )) }