From 8df0d7f8b6796ee1f27c1241bc21d9348e53a0f3 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 11:01:50 -0400 Subject: [PATCH 1/8] deprecate all decompression methods without a context Signed-off-by: Joe Isaacs --- vortex-array/benches/take_patches.rs | 4 ++++ vortex-array/benches/varbinview_compact.rs | 3 +++ vortex-array/src/array/erased.rs | 3 +++ vortex-array/src/array/typed.rs | 1 + vortex-array/src/arrays/arbitrary.rs | 2 ++ .../src/arrays/bool/compute/fill_null.rs | 1 + vortex-array/src/arrays/bool/compute/take.rs | 2 ++ .../src/arrays/bool/vtable/operations.rs | 3 +++ vortex-array/src/arrays/chunked/array.rs | 1 + .../src/arrays/chunked/compute/take.rs | 2 ++ vortex-array/src/arrays/chunked/compute/zip.rs | 2 ++ .../src/arrays/chunked/paired_chunks.rs | 2 ++ vortex-array/src/arrays/chunked/tests.rs | 3 +++ .../src/arrays/chunked/vtable/canonical.rs | 3 +++ vortex-array/src/arrays/chunked/vtable/mod.rs | 2 ++ .../src/arrays/constant/compute/take.rs | 3 +++ .../src/arrays/constant/vtable/canonical.rs | 16 ++++++++++++++++ vortex-array/src/arrays/datetime/test.rs | 1 + .../src/arrays/decimal/compute/cast.rs | 8 ++++++++ .../src/arrays/decimal/compute/fill_null.rs | 5 +++++ vortex-array/src/arrays/dict/array.rs | 4 ++++ vortex-array/src/arrays/dict/compute/cast.rs | 4 ++++ .../src/arrays/dict/compute/fill_null.rs | 2 ++ vortex-array/src/arrays/dict/compute/mod.rs | 5 +++++ vortex-array/src/arrays/dict/vtable/mod.rs | 2 +- .../src/arrays/extension/compute/cast.rs | 1 + .../src/arrays/extension/compute/rules.rs | 3 +++ vortex-array/src/arrays/filter/execute/bool.rs | 2 ++ .../src/arrays/filter/execute/listview.rs | 5 +++++ .../src/arrays/filter/execute/primitive.rs | 2 ++ .../src/arrays/fixed_size_list/compute/take.rs | 4 ++-- .../src/arrays/fixed_size_list/tests/nested.rs | 3 +++ vortex-array/src/arrays/list/array.rs | 1 + vortex-array/src/arrays/list/compute/cast.rs | 2 ++ vortex-array/src/arrays/list/compute/take.rs | 5 +++++ vortex-array/src/arrays/listview/array.rs | 4 ++++ vortex-array/src/arrays/listview/conversion.rs | 3 +++ vortex-array/src/arrays/listview/rebuild.rs | 6 ++++++ .../src/arrays/listview/tests/filter.rs | 5 +++++ .../src/arrays/listview/tests/operations.rs | 4 ++++ vortex-array/src/arrays/listview/tests/take.rs | 5 +++++ vortex-array/src/arrays/masked/tests.rs | 2 ++ vortex-array/src/arrays/null/compute/mod.rs | 3 +++ vortex-array/src/arrays/null/compute/take.rs | 2 ++ .../src/arrays/patched/compute/take.rs | 5 +++++ .../src/arrays/primitive/array/accessor.rs | 2 ++ vortex-array/src/arrays/primitive/array/mod.rs | 4 ++++ .../src/arrays/primitive/array/patch.rs | 2 ++ .../src/arrays/primitive/compute/cast.rs | 11 +++++++++++ .../src/arrays/primitive/compute/fill_null.rs | 5 +++++ .../src/arrays/struct_/compute/cast.rs | 3 +++ .../src/arrays/struct_/compute/rules.rs | 4 ++++ vortex-array/src/arrays/varbin/accessor.rs | 2 ++ vortex-array/src/arrays/varbin/array.rs | 2 ++ .../src/arrays/varbin/compute/compare.rs | 3 +++ .../src/arrays/varbin/vtable/canonical.rs | 1 + vortex-array/src/arrays/varbinview/accessor.rs | 2 ++ .../src/arrays/varbinview/compute/mod.rs | 2 ++ .../src/arrays/varbinview/compute/take.rs | 3 +++ .../src/arrays/varbinview/compute/zip.rs | 2 ++ vortex-array/src/arrays/varbinview/tests.rs | 2 ++ vortex-array/src/arrow/record_batch.rs | 1 + vortex-array/src/builders/bool.rs | 4 ++++ vortex-array/src/builders/decimal.rs | 2 ++ vortex-array/src/builders/dict/bytes.rs | 9 ++++++++- vortex-array/src/builders/dict/mod.rs | 2 ++ vortex-array/src/builders/dict/primitive.rs | 2 ++ vortex-array/src/builders/extension.rs | 2 ++ vortex-array/src/builders/fixed_size_list.rs | 18 ++++++++++++++++++ vortex-array/src/builders/list.rs | 8 ++++++++ vortex-array/src/builders/listview.rs | 2 ++ vortex-array/src/builders/primitive.rs | 2 ++ vortex-array/src/builders/struct_.rs | 2 ++ vortex-array/src/builders/tests.rs | 1 + vortex-array/src/builders/varbinview.rs | 2 ++ vortex-array/src/canonical.rs | 11 +++++++++++ .../src/compute/conformance/binary_numeric.rs | 3 +++ .../src/compute/conformance/consistency.rs | 2 ++ vortex-array/src/compute/conformance/take.rs | 1 + vortex-array/src/display/mod.rs | 2 ++ vortex-array/src/normalize.rs | 1 + vortex-array/src/patches.rs | 7 +++++++ vortex-array/src/scalar_fn/fns/between/mod.rs | 2 ++ .../src/scalar_fn/fns/binary/boolean.rs | 2 ++ .../src/scalar_fn/fns/binary/compare.rs | 2 ++ .../src/scalar_fn/fns/list_contains/mod.rs | 3 +++ vortex-array/src/scalar_fn/fns/merge.rs | 4 ++++ vortex-array/src/scalar_fn/fns/not/mod.rs | 2 ++ vortex-array/src/scalar_fn/fns/pack.rs | 6 ++++++ vortex-array/src/scalar_fn/fns/select.rs | 3 +++ 90 files changed, 305 insertions(+), 4 deletions(-) diff --git a/vortex-array/benches/take_patches.rs b/vortex-array/benches/take_patches.rs index 85d7f6ffcd0..04d7fbccb80 100644 --- a/vortex-array/benches/take_patches.rs +++ b/vortex-array/benches/take_patches.rs @@ -11,6 +11,7 @@ use rand::rngs::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[allow(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::patches::Patches; @@ -37,6 +38,7 @@ const BENCH_ARGS: &[(f64, f64)] = &[ ]; #[divan::bench(args = BENCH_ARGS)] +#[expect(deprecated)] fn take_search(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { let mut rng = StdRng::seed_from_u64(0); let patches = fixture(65536, patches_sparsity, &mut rng); @@ -54,6 +56,7 @@ fn take_search(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) } #[divan::bench(args = BENCH_ARGS)] +#[expect(deprecated)] fn take_search_chunked(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { let mut rng = StdRng::seed_from_u64(0); let patches = fixture_with_chunk_offsets(65536, patches_sparsity, &mut rng); @@ -71,6 +74,7 @@ fn take_search_chunked(bencher: Bencher, (patches_sparsity, index_multiple): (f6 } #[divan::bench(args = BENCH_ARGS)] +#[expect(deprecated)] fn take_map(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { let mut rng = StdRng::seed_from_u64(0); let patches = fixture(65536, patches_sparsity, &mut rng); diff --git a/vortex-array/benches/varbinview_compact.rs b/vortex-array/benches/varbinview_compact.rs index ae763055db1..59e4bc936ce 100644 --- a/vortex-array/benches/varbinview_compact.rs +++ b/vortex-array/benches/varbinview_compact.rs @@ -7,6 +7,7 @@ use rand::SeedableRng; use rand::rngs::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; +#[allow(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::VarBinViewArray; use vortex_array::builders::VarBinViewBuilder; @@ -37,6 +38,7 @@ fn compact_sliced(bencher: Bencher, args: (usize, usize)) { compact_sliced_impl(bencher, args); } +#[expect(deprecated)] fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)) { let base_size = (output_size * 100) / utilization_pct; let base_array = build_varbinview_fixture(base_size); @@ -54,6 +56,7 @@ fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize) }) } +#[expect(deprecated)] fn compact_sliced_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)) { let base_size = (output_size * 100) / utilization_pct; let base_array = build_varbinview_fixture(base_size); diff --git a/vortex-array/src/array/erased.rs b/vortex-array/src/array/erased.rs index 3fe72921b7c..654a389992e 100644 --- a/vortex-array/src/array/erased.rs +++ b/vortex-array/src/array/erased.rs @@ -301,11 +301,14 @@ impl ArrayRef { } /// Returns the canonical representation of the array. + #[deprecated(note = "use `array.execute::(ctx)` instead")] pub fn into_canonical(self) -> VortexResult { self.execute(&mut LEGACY_SESSION.create_execution_ctx()) } /// Returns the canonical representation of the array. + #[deprecated(note = "use `array.execute::(ctx)` instead")] + #[expect(deprecated)] pub fn to_canonical(&self) -> VortexResult { self.clone().into_canonical() } diff --git a/vortex-array/src/array/typed.rs b/vortex-array/src/array/typed.rs index 7fb1248aab9..6b123afc268 100644 --- a/vortex-array/src/array/typed.rs +++ b/vortex-array/src/array/typed.rs @@ -394,6 +394,7 @@ impl Array { } #[deprecated(note = "Use Array::::execute::() instead")] + #[expect(deprecated)] pub fn to_canonical(&self) -> VortexResult { self.inner.to_canonical() } diff --git a/vortex-array/src/arrays/arbitrary.rs b/vortex-array/src/arrays/arbitrary.rs index 16099d5c2c1..33160d106be 100644 --- a/vortex-array/src/arrays/arbitrary.rs +++ b/vortex-array/src/arrays/arbitrary.rs @@ -13,6 +13,7 @@ use vortex_error::VortexExpect; use crate::ArrayRef; use crate::IntoArray; +#[allow(deprecated)] use crate::ToCanonical; use crate::arrays::BoolArray; use crate::arrays::ChunkedArray; @@ -83,6 +84,7 @@ fn random_array(u: &mut Unstructured, dtype: &DType, len: Option) -> Resu } /// Creates a random array chunk. +#[expect(deprecated)] fn random_array_chunk( u: &mut Unstructured<'_>, dtype: &DType, diff --git a/vortex-array/src/arrays/bool/compute/fill_null.rs b/vortex-array/src/arrays/bool/compute/fill_null.rs index f2489f9d073..8ebbbb9c018 100644 --- a/vortex-array/src/arrays/bool/compute/fill_null.rs +++ b/vortex-array/src/arrays/bool/compute/fill_null.rs @@ -42,6 +42,7 @@ impl FillNullKernel for Bool { } #[cfg(test)] +#[allow(deprecated)] mod tests { use rstest::rstest; use vortex_buffer::BitBuffer; diff --git a/vortex-array/src/arrays/bool/compute/take.rs b/vortex-array/src/arrays/bool/compute/take.rs index b3b3a269795..598aaf557ec 100644 --- a/vortex-array/src/arrays/bool/compute/take.rs +++ b/vortex-array/src/arrays/bool/compute/take.rs @@ -84,6 +84,7 @@ mod test { use vortex_buffer::buffer; use crate::IntoArray as _; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::BoolArray; use crate::arrays::PrimitiveArray; @@ -93,6 +94,7 @@ mod test { use crate::validity::Validity; #[test] + #[expect(deprecated)] fn take_nullable() { let reference = BoolArray::from_iter(vec![ Some(false), diff --git a/vortex-array/src/arrays/bool/vtable/operations.rs b/vortex-array/src/arrays/bool/vtable/operations.rs index ece00b038ea..0736a58c2ca 100644 --- a/vortex-array/src/arrays/bool/vtable/operations.rs +++ b/vortex-array/src/arrays/bool/vtable/operations.rs @@ -28,12 +28,14 @@ mod tests { use std::iter; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::BoolArray; use crate::arrays::bool::BoolArrayExt; use crate::assert_arrays_eq; #[test] + #[expect(deprecated)] fn test_slice_hundred_elements() { let arr = BoolArray::from_iter(iter::repeat_n(Some(true), 100)); let sliced_arr = arr.into_array().slice(8..16).unwrap().to_bool(); @@ -43,6 +45,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn test_slice() { let arr = BoolArray::from_iter([Some(true), Some(true), None, Some(false), None]); let sliced_arr = arr.into_array().slice(1..4).unwrap().to_bool(); diff --git a/vortex-array/src/arrays/chunked/array.rs b/vortex-array/src/arrays/chunked/array.rs index 97be61cb524..8bc34cc74c7 100644 --- a/vortex-array/src/arrays/chunked/array.rs +++ b/vortex-array/src/arrays/chunked/array.rs @@ -179,6 +179,7 @@ impl Array { }) } + #[expect(deprecated)] pub fn rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> VortexResult { let mut new_chunks = Vec::new(); let mut chunks_to_combine = Vec::new(); diff --git a/vortex-array/src/arrays/chunked/compute/take.rs b/vortex-array/src/arrays/chunked/compute/take.rs index 38b0f4313ea..e674ac775fa 100644 --- a/vortex-array/src/arrays/chunked/compute/take.rs +++ b/vortex-array/src/arrays/chunked/compute/take.rs @@ -126,6 +126,7 @@ mod test { use vortex_error::VortexResult; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::BoolArray; use crate::arrays::ChunkedArray; @@ -254,6 +255,7 @@ mod test { } #[test] + #[expect(deprecated)] fn test_take_shuffled_large() -> VortexResult<()> { let nchunks: i32 = 100; let chunk_len: i32 = 1_000; diff --git a/vortex-array/src/arrays/chunked/compute/zip.rs b/vortex-array/src/arrays/chunked/compute/zip.rs index 0979cb15031..5fcf7150420 100644 --- a/vortex-array/src/arrays/chunked/compute/zip.rs +++ b/vortex-array/src/arrays/chunked/compute/zip.rs @@ -52,6 +52,7 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::Chunked; @@ -63,6 +64,7 @@ mod tests { use crate::dtype::PType; #[test] + #[expect(deprecated)] fn test_chunked_zip_aligns_across_boundaries() { let if_true = ChunkedArray::try_new( vec![ diff --git a/vortex-array/src/arrays/chunked/paired_chunks.rs b/vortex-array/src/arrays/chunked/paired_chunks.rs index d81ee13c3b8..1fd2e9183bb 100644 --- a/vortex-array/src/arrays/chunked/paired_chunks.rs +++ b/vortex-array/src/arrays/chunked/paired_chunks.rs @@ -132,10 +132,12 @@ mod tests { } #[expect(clippy::type_complexity)] + #[expect(deprecated)] fn collect_pairs( left: &ChunkedArray, right: &ChunkedArray, ) -> VortexResult, Vec, std::ops::Range)>> { + #[allow(deprecated)] use crate::ToCanonical; let mut result = Vec::new(); for pair in left.paired_chunks(right) { diff --git a/vortex-array/src/arrays/chunked/tests.rs b/vortex-array/src/arrays/chunked/tests.rs index f3f9b45afc9..ef68a7a6147 100644 --- a/vortex-array/src/arrays/chunked/tests.rs +++ b/vortex-array/src/arrays/chunked/tests.rs @@ -19,6 +19,7 @@ use crate::arrays::VarBinViewArray; use crate::arrays::chunked::ChunkedArrayExt; use crate::arrays::struct_::StructArrayExt; use crate::assert_arrays_eq; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; @@ -171,6 +172,7 @@ fn scalar_at_empty_children_leading() { } #[test] +#[expect(deprecated)] pub fn pack_nested_structs() { let struct_array = StructArray::try_new( ["a"].into(), @@ -201,6 +203,7 @@ pub fn pack_nested_structs() { } #[test] +#[expect(deprecated)] pub fn pack_nested_lists() { let l1 = ListArray::try_new( buffer![1, 2, 3, 4].into_array(), diff --git a/vortex-array/src/arrays/chunked/vtable/canonical.rs b/vortex-array/src/arrays/chunked/vtable/canonical.rs index c3d7b5115e9..da01df71ade 100644 --- a/vortex-array/src/arrays/chunked/vtable/canonical.rs +++ b/vortex-array/src/arrays/chunked/vtable/canonical.rs @@ -220,6 +220,7 @@ mod tests { use crate::ExecutionCtx; use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::accessor::ArrayAccessor; @@ -255,6 +256,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn pack_nested_structs() { let struct_array = StructArray::try_new( ["a"].into(), @@ -285,6 +287,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn pack_nested_lists() { let l1 = ListArray::try_new( buffer![1, 2, 3, 4].into_array(), diff --git a/vortex-array/src/arrays/chunked/vtable/mod.rs b/vortex-array/src/arrays/chunked/vtable/mod.rs index c0bc63bfdb6..a035f9ac651 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -21,6 +21,7 @@ use crate::ExecutionCtx; use crate::ExecutionResult; use crate::IntoArray; use crate::Precision; +#[allow(deprecated)] use crate::ToCanonical; use crate::array::Array; use crate::array::ArrayId; @@ -161,6 +162,7 @@ impl VTable for Chunked { Ok(Some(vec![])) } + #[expect(deprecated)] fn deserialize( &self, dtype: &DType, diff --git a/vortex-array/src/arrays/constant/compute/take.rs b/vortex-array/src/arrays/constant/compute/take.rs index e01a37f7caa..1add231b688 100644 --- a/vortex-array/src/arrays/constant/compute/take.rs +++ b/vortex-array/src/arrays/constant/compute/take.rs @@ -72,6 +72,7 @@ mod tests { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; @@ -82,6 +83,7 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; + #[expect(deprecated)] #[test] fn take_nullable_indices() { let array = ConstantArray::new(42, 10).into_array(); @@ -117,6 +119,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn take_all_valid_indices() { let array = ConstantArray::new(42, 10).into_array(); diff --git a/vortex-array/src/arrays/constant/vtable/canonical.rs b/vortex-array/src/arrays/constant/vtable/canonical.rs index fbffbfe4576..5f4bcc5cef4 100644 --- a/vortex-array/src/arrays/constant/vtable/canonical.rs +++ b/vortex-array/src/arrays/constant/vtable/canonical.rs @@ -333,6 +333,7 @@ mod tests { use crate::arrays::listview::ListViewRebuildMode; use crate::arrays::struct_::StructArrayExt; use crate::assert_arrays_eq; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; @@ -343,6 +344,7 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; + #[expect(deprecated)] #[test] fn test_canonicalize_null() { let const_null = ConstantArray::new(Scalar::null(DType::Null), 42); @@ -364,6 +366,7 @@ mod tests { assert_arrays_eq!(const_array, expected); } + #[expect(deprecated)] #[test] fn test_canonicalize_propagates_stats() -> VortexResult<()> { let scalar = Scalar::bool(true, Nullability::NonNullable); @@ -393,6 +396,7 @@ mod tests { Ok(()) } + #[expect(deprecated)] #[test] fn test_canonicalize_scalar_values() { let f16_value = f16::from_f32(5.722046e-6); @@ -411,6 +415,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_canonicalize_lists() -> VortexResult<()> { let list_scalar = Scalar::list( @@ -436,6 +441,7 @@ mod tests { Ok(()) } + #[expect(deprecated)] #[test] fn test_canonicalize_empty_list() { let list_scalar = Scalar::list( @@ -456,6 +462,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_canonicalize_null_list() { let list_scalar = Scalar::null(DType::List( @@ -475,6 +482,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_canonicalize_nullable_struct() { let array = ConstantArray::new( @@ -507,6 +515,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_non_null() { // Test with a non-null fixed-size list constant. @@ -535,6 +544,7 @@ mod tests { } } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_nullable() { // Test with a nullable but non-null fixed-size list constant. @@ -562,6 +572,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_null() { // Test with a null fixed-size list constant. @@ -584,6 +595,7 @@ mod tests { assert!(elements.as_slice::().iter().all(|&x| x == 0)); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_empty() { // Test with size-0 lists (edge case). @@ -604,6 +616,7 @@ mod tests { assert!(canonical.elements().is_empty()); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_nested() { // Test with nested data types (list of strings). @@ -647,6 +660,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_single_element() { // Test with a single-element list. @@ -666,6 +680,7 @@ mod tests { assert_arrays_eq!(elements, PrimitiveArray::from_iter([42i16])); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_with_null_elements() { // Test FSL with nullable element type where some elements are null. @@ -721,6 +736,7 @@ mod tests { assert!(element_validity.is_valid(5).unwrap()); } + #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_large() { // Test with a large constant array. diff --git a/vortex-array/src/arrays/datetime/test.rs b/vortex-array/src/arrays/datetime/test.rs index 3d270ec7053..23455dc4f55 100644 --- a/vortex-array/src/arrays/datetime/test.rs +++ b/vortex-array/src/arrays/datetime/test.rs @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributorsuse crate::dtype::Nullability; +#![allow(deprecated)] use rstest::rstest; use vortex_buffer::buffer; diff --git a/vortex-array/src/arrays/decimal/compute/cast.rs b/vortex-array/src/arrays/decimal/compute/cast.rs index f602b827c03..1f1dd9bd65a 100644 --- a/vortex-array/src/arrays/decimal/compute/cast.rs +++ b/vortex-array/src/arrays/decimal/compute/cast.rs @@ -150,6 +150,7 @@ mod tests { use crate::VortexSessionExecute; use crate::arrays::DecimalArray; use crate::builtins::ArrayBuiltins; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::compute::conformance::cast::test_cast_conformance; use crate::dtype::DType; @@ -158,6 +159,7 @@ mod tests { use crate::dtype::Nullability; use crate::validity::Validity; + #[expect(deprecated)] #[test] fn cast_decimal_to_nullable() { let decimal_dtype = DecimalDType::new(10, 2); @@ -180,6 +182,7 @@ mod tests { assert_eq!(casted.len(), 3); } + #[expect(deprecated)] #[test] fn cast_nullable_to_non_nullable() { let decimal_dtype = DecimalDType::new(10, 2); @@ -199,6 +202,7 @@ mod tests { assert!(matches!(casted.validity(), Ok(Validity::NonNullable))); } + #[expect(deprecated)] #[test] #[should_panic(expected = "Cannot cast array with invalid values to non-nullable type")] fn cast_nullable_with_nulls_to_non_nullable_fails() { @@ -216,6 +220,7 @@ mod tests { .unwrap(); } + #[expect(deprecated)] #[test] fn cast_different_scale_fails() { let array = DecimalArray::new( @@ -240,6 +245,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn cast_downcast_precision_fails() { let array = DecimalArray::new( @@ -264,6 +270,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn cast_upcast_precision_succeeds() { let array = DecimalArray::new( @@ -283,6 +290,7 @@ mod tests { assert_eq!(casted.values_type(), DecimalType::I128); } + #[expect(deprecated)] #[test] fn cast_to_non_decimal_returns_err() { let array = DecimalArray::new( diff --git a/vortex-array/src/arrays/decimal/compute/fill_null.rs b/vortex-array/src/arrays/decimal/compute/fill_null.rs index de01076b231..a71e3861f1b 100644 --- a/vortex-array/src/arrays/decimal/compute/fill_null.rs +++ b/vortex-array/src/arrays/decimal/compute/fill_null.rs @@ -94,6 +94,7 @@ mod tests { use crate::arrays::DecimalArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DecimalDType; use crate::dtype::Nullability; @@ -101,6 +102,7 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; + #[expect(deprecated)] #[test] fn fill_null_leading_none() { let decimal_dtype = DecimalDType::new(19, 2); @@ -135,6 +137,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn fill_null_all_none() { let decimal_dtype = DecimalDType::new(19, 2); @@ -160,6 +163,7 @@ mod tests { } /// fill_null with a value that overflows the array's storage type should upcast the array. + #[expect(deprecated)] #[test] fn fill_null_overflow_upcasts() { let decimal_dtype = DecimalDType::new(3, 0); @@ -180,6 +184,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn fill_null_non_nullable() { let decimal_dtype = DecimalDType::new(19, 2); diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index d3ef863990c..fa137a5758c 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -13,6 +13,7 @@ use vortex_mask::AllOr; use crate::ArrayRef; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::array::Array; @@ -140,6 +141,7 @@ pub trait DictArrayExt: TypedArrayRef + DictArraySlotsExt { Ok(()) } + #[expect(deprecated)] fn compute_referenced_values_mask(&self, referenced: bool) -> VortexResult { let codes = self.codes(); let codes_validity = codes @@ -270,6 +272,7 @@ mod test { use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ChunkedArray; @@ -421,6 +424,7 @@ mod test { .into_array() } + #[expect(deprecated)] #[test] fn test_dict_array_from_primitive_chunks() -> VortexResult<()> { let len = 2; diff --git a/vortex-array/src/arrays/dict/compute/cast.rs b/vortex-array/src/arrays/dict/compute/cast.rs index 07de42dd384..78455338afe 100644 --- a/vortex-array/src/arrays/dict/compute/cast.rs +++ b/vortex-array/src/arrays/dict/compute/cast.rs @@ -57,6 +57,7 @@ mod tests { use vortex_buffer::buffer; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::Dict; use crate::arrays::PrimitiveArray; @@ -69,6 +70,7 @@ mod tests { use crate::dtype::Nullability; use crate::dtype::PType; + #[expect(deprecated)] #[test] fn test_cast_dict_to_wider_type() { let values = buffer![1i32, 2, 3, 2, 1].into_array(); @@ -103,6 +105,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_cast_dict_allvalid_to_nonnullable_and_back() { // Create an AllValid dict array (no nulls) @@ -182,6 +185,7 @@ mod tests { test_cast_conformance(&array); } + #[expect(deprecated)] #[test] fn test_cast_dict_with_unreferenced_null_values_to_nonnullable() { use crate::arrays::DictArray; diff --git a/vortex-array/src/arrays/dict/compute/fill_null.rs b/vortex-array/src/arrays/dict/compute/fill_null.rs index 8627759256a..9107d9f2f98 100644 --- a/vortex-array/src/arrays/dict/compute/fill_null.rs +++ b/vortex-array/src/arrays/dict/compute/fill_null.rs @@ -95,6 +95,7 @@ mod tests { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::DictArray; @@ -105,6 +106,7 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; + #[expect(deprecated)] #[test] fn nullable_codes_fill_in_values() { let dict = DictArray::try_new( diff --git a/vortex-array/src/arrays/dict/compute/mod.rs b/vortex-array/src/arrays/dict/compute/mod.rs index 84facbd34bf..c5f854a2ad5 100644 --- a/vortex-array/src/arrays/dict/compute/mod.rs +++ b/vortex-array/src/arrays/dict/compute/mod.rs @@ -60,6 +60,7 @@ mod test { use crate::ArrayRef; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::ConstantArray; @@ -76,6 +77,7 @@ mod test { use crate::dtype::Nullability; use crate::dtype::PType::I32; use crate::scalar_fn::fns::operators::Operator; + #[expect(deprecated)] #[test] fn canonicalise_nullable_primitive() { let values: Vec> = (0..65) @@ -96,6 +98,7 @@ mod test { assert_arrays_eq!(actual, expected); } + #[expect(deprecated)] #[test] fn canonicalise_non_nullable_primitive_32_unique_values() { let unique_values: Vec = (0..32).collect(); @@ -107,6 +110,7 @@ mod test { assert_arrays_eq!(actual, expected); } + #[expect(deprecated)] #[test] fn canonicalise_non_nullable_primitive_100_unique_values() { let unique_values: Vec = (0..100).collect(); @@ -118,6 +122,7 @@ mod test { assert_arrays_eq!(actual, expected); } + #[expect(deprecated)] #[test] fn canonicalise_nullable_varbin() { let reference = VarBinViewArray::from_iter( diff --git a/vortex-array/src/arrays/dict/vtable/mod.rs b/vortex-array/src/arrays/dict/vtable/mod.rs index cf1c26491b0..a67deff4c45 100644 --- a/vortex-array/src/arrays/dict/vtable/mod.rs +++ b/vortex-array/src/arrays/dict/vtable/mod.rs @@ -198,7 +198,7 @@ impl VTable for Dict { let values = array.values().clone(); debug_assert!(values.is_canonical()); // TODO: add canonical owned cast. - let values = values.to_canonical()?; + let values = values.execute::(ctx)?; Ok(ExecutionResult::done(take_canonical(values, &codes, ctx)?)) } diff --git a/vortex-array/src/arrays/extension/compute/cast.rs b/vortex-array/src/arrays/extension/compute/cast.rs index eda55a73f50..7e026cc714f 100644 --- a/vortex-array/src/arrays/extension/compute/cast.rs +++ b/vortex-array/src/arrays/extension/compute/cast.rs @@ -95,6 +95,7 @@ mod tests { assert_eq!(output.dtype(), &new_dtype); } + #[expect(deprecated)] #[test] fn cast_different_ext_dtype() { let original_dtype = diff --git a/vortex-array/src/arrays/extension/compute/rules.rs b/vortex-array/src/arrays/extension/compute/rules.rs index 3f5295f729e..78079bc32ae 100644 --- a/vortex-array/src/arrays/extension/compute/rules.rs +++ b/vortex-array/src/arrays/extension/compute/rules.rs @@ -56,6 +56,7 @@ mod tests { use vortex_mask::Mask; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::ConstantArray; use crate::arrays::Extension; @@ -118,6 +119,7 @@ mod tests { .erased() } + #[expect(deprecated)] #[test] fn test_filter_pushdown() { let ext_dtype = test_ext_dtype(); @@ -147,6 +149,7 @@ mod tests { assert_eq!(storage_result, &[1, 3, 5]); } + #[expect(deprecated)] #[test] fn test_filter_pushdown_nullable() { let ext_dtype = ExtDType::::try_new( diff --git a/vortex-array/src/arrays/filter/execute/bool.rs b/vortex-array/src/arrays/filter/execute/bool.rs index 1a35d1e74aa..2046806cc4a 100644 --- a/vortex-array/src/arrays/filter/execute/bool.rs +++ b/vortex-array/src/arrays/filter/execute/bool.rs @@ -31,9 +31,11 @@ mod test { use crate::IntoArray; use crate::arrays::filter::execute::bool::BoolArray; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::compute::conformance::filter::test_filter_conformance; + #[expect(deprecated)] #[test] fn filter_bool_test() { let arr = BoolArray::from_iter([true, true, false]); diff --git a/vortex-array/src/arrays/filter/execute/listview.rs b/vortex-array/src/arrays/filter/execute/listview.rs index d1bea9d5128..e2a5c1c7013 100644 --- a/vortex-array/src/arrays/filter/execute/listview.rs +++ b/vortex-array/src/arrays/filter/execute/listview.rs @@ -86,6 +86,7 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ListViewArray; @@ -179,6 +180,7 @@ mod test { assert_arrays_eq!(filtered, expected); } + #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_preserves_unreferenced_elements() { @@ -211,6 +213,7 @@ mod test { assert_eq!(result_list.offset_at(1), 0, "Wrong offset at index 3"); } + #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_with_gaps() { @@ -250,6 +253,7 @@ mod test { ); } + #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_constant_arrays() { @@ -303,6 +307,7 @@ mod test { assert_eq!(result2_list.size_at(1), 3); } + #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_extreme_offsets() { diff --git a/vortex-array/src/arrays/filter/execute/primitive.rs b/vortex-array/src/arrays/filter/execute/primitive.rs index 4a1b6367428..bc86439f01b 100644 --- a/vortex-array/src/arrays/filter/execute/primitive.rs +++ b/vortex-array/src/arrays/filter/execute/primitive.rs @@ -35,11 +35,13 @@ mod test { use crate::IntoArray; use crate::arrays::PrimitiveArray; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::compute::conformance::filter::LARGE_SIZE; use crate::compute::conformance::filter::MEDIUM_SIZE; use crate::compute::conformance::filter::test_filter_conformance; + #[expect(deprecated)] #[test] fn filter_run_variant_mixed_test() { let mask = [true, true, false, true, true, true, false, true]; diff --git a/vortex-array/src/arrays/fixed_size_list/compute/take.rs b/vortex-array/src/arrays/fixed_size_list/compute/take.rs index 465b2817166..00c2eb8a198 100644 --- a/vortex-array/src/arrays/fixed_size_list/compute/take.rs +++ b/vortex-array/src/arrays/fixed_size_list/compute/take.rs @@ -10,8 +10,8 @@ use vortex_mask::Mask; use crate::ArrayRef; use crate::IntoArray; -use crate::ToCanonical; use crate::array::ArrayView; +use crate::arrays::BoolArray; use crate::arrays::FixedSizeList; use crate::arrays::FixedSizeListArray; use crate::arrays::Primitive; @@ -162,7 +162,7 @@ fn take_nullable_fsl( { Validity::NonNullable | Validity::AllValid => Mask::new_true(indices_len), Validity::AllInvalid => Mask::new_false(indices_len), - Validity::Array(a) => a.to_bool().to_mask(ctx), + Validity::Array(a) => a.execute::(ctx)?.to_mask(ctx), }; // We must use placeholder zeros for null lists to maintain the array length without diff --git a/vortex-array/src/arrays/fixed_size_list/tests/nested.rs b/vortex-array/src/arrays/fixed_size_list/tests/nested.rs index 81fd9afe0c5..fa642f193f1 100644 --- a/vortex-array/src/arrays/fixed_size_list/tests/nested.rs +++ b/vortex-array/src/arrays/fixed_size_list/tests/nested.rs @@ -7,6 +7,7 @@ use vortex_buffer::buffer; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::FixedSizeListArray; @@ -27,6 +28,7 @@ use crate::validity::Validity; // FSL of FSL tests //////////////////////////////////////////////////////////////////////////////////////////////////// +#[expect(deprecated)] #[test] fn test_fsl_of_fsl_basic() { let outer_len = 2; @@ -261,6 +263,7 @@ fn test_fsl_of_fsl_with_nulls() { ); } +#[expect(deprecated)] #[test] fn test_deeply_nested_fsl() { let _len = 2; diff --git a/vortex-array/src/arrays/list/array.rs b/vortex-array/src/arrays/list/array.rs index 55b143f644f..6df72f2875b 100644 --- a/vortex-array/src/arrays/list/array.rs +++ b/vortex-array/src/arrays/list/array.rs @@ -324,6 +324,7 @@ pub trait ListArrayExt: TypedArrayRef { self.elements().dtype() } + #[expect(deprecated)] fn reset_offsets(&self, recurse: bool) -> VortexResult> { let mut elements = self.sliced_elements()?; if recurse && elements.is_canonical() { diff --git a/vortex-array/src/arrays/list/compute/cast.rs b/vortex-array/src/arrays/list/compute/cast.rs index bac84916390..3215a17f803 100644 --- a/vortex-array/src/arrays/list/compute/cast.rs +++ b/vortex-array/src/arrays/list/compute/cast.rs @@ -75,6 +75,7 @@ mod tests { assert_eq!(result.len(), list.len()); } + #[expect(deprecated)] #[test] fn test_cast_to_wrong_type() { let list = ListArray::try_new( @@ -94,6 +95,7 @@ mod tests { assert!(result.is_err()); } + #[expect(deprecated)] #[test] fn test_cant_cast_nulls_to_non_null() { // Test that if list has nulls, the conversion will fail diff --git a/vortex-array/src/arrays/list/compute/take.rs b/vortex-array/src/arrays/list/compute/take.rs index 52c2296dec8..dfb7872fe4e 100644 --- a/vortex-array/src/arrays/list/compute/take.rs +++ b/vortex-array/src/arrays/list/compute/take.rs @@ -200,6 +200,7 @@ mod test { use crate::IntoArray as _; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::BoolArray; @@ -212,6 +213,7 @@ mod test { use crate::scalar::Scalar; use crate::validity::Validity; + #[expect(deprecated)] #[test] fn nullable_take() { let list = ListArray::try_new( @@ -315,6 +317,7 @@ mod test { ); } + #[expect(deprecated)] #[test] fn non_nullable_take() { let list = ListArray::try_new( @@ -453,6 +456,7 @@ mod test { test_take_conformance(&list.into_array()); } + #[expect(deprecated)] #[test] fn test_u64_offset_accumulation_non_nullable() { let elements = buffer![0i32; 200].into_array(); @@ -481,6 +485,7 @@ mod test { ); } + #[expect(deprecated)] #[test] fn test_u64_offset_accumulation_nullable() { let elements = buffer![0i32; 150].into_array(); diff --git a/vortex-array/src/arrays/listview/array.rs b/vortex-array/src/arrays/listview/array.rs index f440b360951..761d8d713d1 100644 --- a/vortex-array/src/arrays/listview/array.rs +++ b/vortex-array/src/arrays/listview/array.rs @@ -14,6 +14,7 @@ use vortex_error::vortex_err; use crate::ArrayRef; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::array::Array; @@ -208,6 +209,7 @@ impl ListViewData { } /// Validates the components that would be used to create a `ListViewArray`. + #[expect(deprecated)] pub fn validate( elements: &ArrayRef, offsets: &ArrayRef, @@ -381,6 +383,7 @@ pub trait ListViewArrayExt: TypedArrayRef { self.elements().slice(offset..offset + size) } + #[expect(deprecated)] fn verify_is_zero_copy_to_list(&self) -> bool { validate_zctl( self.elements(), @@ -454,6 +457,7 @@ impl Array { /// # Safety /// /// See [`ListViewData::with_zero_copy_to_list`]. + #[expect(deprecated)] pub unsafe fn with_zero_copy_to_list(self, is_zctl: bool) -> Self { if cfg!(debug_assertions) && is_zctl { validate_zctl( diff --git a/vortex-array/src/arrays/listview/conversion.rs b/vortex-array/src/arrays/listview/conversion.rs index 54571ecdf21..9467a068402 100644 --- a/vortex-array/src/arrays/listview/conversion.rs +++ b/vortex-array/src/arrays/listview/conversion.rs @@ -8,6 +8,7 @@ use crate::ArrayRef; use crate::Canonical; use crate::ExecutionCtx; use crate::IntoArray; +#[allow(deprecated)] use crate::ToCanonical; use crate::arrays::ExtensionArray; use crate::arrays::FixedSizeListArray; @@ -139,6 +140,7 @@ pub fn list_from_list_view(list_view: ListViewArray) -> VortexResult /// /// The `ListViewArray` must have offsets that are sorted, and every size must be equal to the gap /// between `offset[i]` and `offset[i + 1]`. +#[expect(deprecated)] unsafe fn build_list_offsets_from_list_view( list_view: &ListViewArray, ) -> ArrayRef { @@ -182,6 +184,7 @@ unsafe fn build_list_offsets_from_list_view( /// Recursively converts all `ListViewArray`s to `ListArray`s in a nested array structure. /// /// The conversion happens bottom-up, processing children before parents. +#[expect(deprecated)] pub fn recursive_list_from_list_view(array: ArrayRef) -> VortexResult { if !array.dtype().is_nested() { return Ok(array); diff --git a/vortex-array/src/arrays/listview/rebuild.rs b/vortex-array/src/arrays/listview/rebuild.rs index d0a88a750e6..ad3f4083805 100644 --- a/vortex-array/src/arrays/listview/rebuild.rs +++ b/vortex-array/src/arrays/listview/rebuild.rs @@ -8,6 +8,7 @@ use vortex_error::VortexResult; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::aggregate_fn::fns::min_max::min_max; @@ -113,6 +114,7 @@ impl ListViewArray { /// Picks between [`rebuild_with_take`](Self::rebuild_with_take) and /// [`rebuild_list_by_list`](Self::rebuild_list_by_list) based on element dtype and average /// list size. + #[expect(deprecated)] fn naive_rebuild( &self, ) -> VortexResult { @@ -146,6 +148,7 @@ impl ListViewArray { /// Rebuilds elements using a single bulk `take`: collect all element indices into a flat /// `BufferMut`, perform a single `take`. + #[expect(deprecated)] fn rebuild_with_take( &self, ) -> VortexResult { @@ -194,6 +197,7 @@ impl ListViewArray { /// Rebuilds elements list-by-list: canonicalize elements upfront, then for each list `slice` /// the relevant range and `extend_from_array` into a typed builder. + #[expect(deprecated)] fn rebuild_list_by_list( &self, ) -> VortexResult { @@ -379,6 +383,7 @@ mod tests { use super::ListViewRebuildMode; use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ListViewArray; @@ -463,6 +468,7 @@ mod tests { Ok(()) } + #[expect(deprecated)] #[test] fn test_rebuild_trim_elements_basic() -> VortexResult<()> { // Test trimming both leading and trailing unused elements while preserving gaps in the diff --git a/vortex-array/src/arrays/listview/tests/filter.rs b/vortex-array/src/arrays/listview/tests/filter.rs index 271ea746482..fe09b1c81ae 100644 --- a/vortex-array/src/arrays/listview/tests/filter.rs +++ b/vortex-array/src/arrays/listview/tests/filter.rs @@ -12,6 +12,7 @@ use super::common::create_nullable_listview; use super::common::create_overlapping_listview; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; @@ -34,6 +35,7 @@ fn test_filter_listview_conformance(#[case] listview: ListViewArray) { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] +#[expect(deprecated)] #[test] fn test_filter_preserves_unreferenced_elements() { // ListView-specific: Test that filter preserves the entire elements array. @@ -65,6 +67,7 @@ fn test_filter_preserves_unreferenced_elements() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] +#[expect(deprecated)] #[test] fn test_filter_with_gaps() { // ListView-specific: Test filtering with gaps in elements array. @@ -103,6 +106,7 @@ fn test_filter_with_gaps() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] +#[expect(deprecated)] #[test] fn test_filter_constant_arrays() { // ListView-specific: Test filter with ConstantArray for offsets/sizes. @@ -156,6 +160,7 @@ fn test_filter_constant_arrays() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] +#[expect(deprecated)] #[test] fn test_filter_extreme_offsets() { // ListView-specific: Test with very large offsets. diff --git a/vortex-array/src/arrays/listview/tests/operations.rs b/vortex-array/src/arrays/listview/tests/operations.rs index b890c346d87..3de16abb1fa 100644 --- a/vortex-array/src/arrays/listview/tests/operations.rs +++ b/vortex-array/src/arrays/listview/tests/operations.rs @@ -1,6 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +#![allow(deprecated)] + use std::sync::Arc; use rstest::rstest; @@ -216,6 +218,7 @@ fn test_slice_edge_cases( #[case::i32_to_i64(PType::I32, PType::I64)] #[case::f32_to_f64(PType::F32, PType::F64)] #[case::u8_to_u16(PType::U8, PType::U16)] +#[allow(deprecated)] fn test_cast_numeric_types(#[case] from_ptype: PType, #[case] to_ptype: PType) { let elements = match from_ptype { PType::I32 => buffer![1i32, 2, 3, 4, 5, 6].into_array(), @@ -303,6 +306,7 @@ fn test_cast_with_nulls() { #[rstest] #[case::empty_lists(vec![0, 1, 0, 1], 4)] #[case::overlapping(vec![3, 3, 5], 3)] +#[allow(deprecated)] fn test_cast_special_patterns(#[case] expected_sizes: Vec, #[case] list_count: usize) { let is_empty_case = list_count == 4; diff --git a/vortex-array/src/arrays/listview/tests/take.rs b/vortex-array/src/arrays/listview/tests/take.rs index b1134f97a04..3caeba77d25 100644 --- a/vortex-array/src/arrays/listview/tests/take.rs +++ b/vortex-array/src/arrays/listview/tests/take.rs @@ -11,6 +11,7 @@ use super::common::create_nullable_listview; use super::common::create_overlapping_listview; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; @@ -35,6 +36,7 @@ fn test_take_listview_conformance(#[case] listview: ListViewArray) { // ListView-specific tests that aren't covered by conformance. #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] +#[expect(deprecated)] #[test] fn test_take_preserves_unreferenced_elements() { // ListView-specific: Test that take preserves the entire elements array @@ -64,6 +66,7 @@ fn test_take_preserves_unreferenced_elements() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] +#[expect(deprecated)] #[test] fn test_take_with_gaps() { // ListView-specific: Test with gaps in elements array. @@ -92,6 +95,7 @@ fn test_take_with_gaps() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] +#[expect(deprecated)] #[test] fn test_take_constant_arrays() { // ListView-specific: Test with ConstantArray for offsets/sizes. @@ -145,6 +149,7 @@ fn test_take_constant_arrays() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] +#[expect(deprecated)] #[test] fn test_take_extreme_offsets() { // ListView-specific: Test with very large offsets to demonstrate diff --git a/vortex-array/src/arrays/masked/tests.rs b/vortex-array/src/arrays/masked/tests.rs index ed108a77bf7..022b61723d9 100644 --- a/vortex-array/src/arrays/masked/tests.rs +++ b/vortex-array/src/arrays/masked/tests.rs @@ -9,6 +9,7 @@ use super::*; use crate::Canonical; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::PrimitiveArray; @@ -56,6 +57,7 @@ fn test_canonical_dtype_matches_array_dtype() -> VortexResult<()> { } #[test] +#[expect(deprecated)] fn test_masked_child_with_validity() { // When validity has nulls, masked_child should apply inverted mask. let child = PrimitiveArray::from_iter([1i32, 2, 3, 4, 5]).into_array(); diff --git a/vortex-array/src/arrays/null/compute/mod.rs b/vortex-array/src/arrays/null/compute/mod.rs index 1d787369d96..d2492fa394c 100644 --- a/vortex-array/src/arrays/null/compute/mod.rs +++ b/vortex-array/src/arrays/null/compute/mod.rs @@ -16,6 +16,7 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::NullArray; @@ -26,6 +27,7 @@ mod test { use crate::dtype::DType; #[test] + #[expect(deprecated)] fn test_slice_nulls() { let nulls = NullArray::new(10); let sliced = nulls.slice(0..4).unwrap().to_null(); @@ -43,6 +45,7 @@ mod test { } #[test] + #[expect(deprecated)] fn test_take_nulls() { let nulls = NullArray::new(10); let taken = nulls diff --git a/vortex-array/src/arrays/null/compute/take.rs b/vortex-array/src/arrays/null/compute/take.rs index 76ae248eded..d84e22b4350 100644 --- a/vortex-array/src/arrays/null/compute/take.rs +++ b/vortex-array/src/arrays/null/compute/take.rs @@ -6,6 +6,7 @@ use vortex_error::vortex_bail; use crate::ArrayRef; use crate::IntoArray; +#[allow(deprecated)] use crate::ToCanonical; use crate::array::ArrayView; use crate::arrays::Null; @@ -17,6 +18,7 @@ use crate::optimizer::rules::ParentRuleSet; impl TakeReduce for Null { #[expect(clippy::cast_possible_truncation)] + #[expect(deprecated)] fn take(array: ArrayView<'_, Null>, indices: &ArrayRef) -> VortexResult> { let indices = indices.to_primitive(); diff --git a/vortex-array/src/arrays/patched/compute/take.rs b/vortex-array/src/arrays/patched/compute/take.rs index ef3ba7fbbfe..4f3403e6f3c 100644 --- a/vortex-array/src/arrays/patched/compute/take.rs +++ b/vortex-array/src/arrays/patched/compute/take.rs @@ -167,6 +167,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn test_take_basic() -> VortexResult<()> { // Array with base values [0, 0, 0, 0, 0] patched at indices [1, 3] with values [10, 30] let array = make_patched_array(&[0; 5], &[1, 3], &[10, 30], 0..5)?; @@ -182,6 +183,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn test_take_sliced() -> VortexResult<()> { let array = make_patched_array(&[0; 10], &[1, 3], &[100, 200], 2..10)?; @@ -195,6 +197,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn test_take_out_of_order() -> VortexResult<()> { // Array with base values [0, 0, 0, 0, 0] patched at indices [1, 3] with values [10, 30] let array = make_patched_array(&[0; 5], &[1, 3], &[10, 30], 0..5)?; @@ -210,6 +213,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn test_take_duplicates() -> VortexResult<()> { // Array with base values [0, 0, 0, 0, 0] patched at index [2] with value [99] let array = make_patched_array(&[0; 5], &[2], &[99], 0..5)?; @@ -228,6 +232,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn test_take_with_null_indices() -> VortexResult<()> { use crate::arrays::BoolArray; use crate::validity::Validity; diff --git a/vortex-array/src/arrays/primitive/array/accessor.rs b/vortex-array/src/arrays/primitive/array/accessor.rs index 5a3665c71ed..c59380d2895 100644 --- a/vortex-array/src/arrays/primitive/array/accessor.rs +++ b/vortex-array/src/arrays/primitive/array/accessor.rs @@ -5,6 +5,7 @@ use std::iter; use vortex_error::VortexExpect; +#[allow(deprecated)] use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::PrimitiveArray; @@ -12,6 +13,7 @@ use crate::dtype::NativePType; use crate::validity::Validity; impl ArrayAccessor for PrimitiveArray { + #[expect(deprecated)] fn with_iterator(&self, f: F) -> R where F: for<'a> FnOnce(&mut dyn Iterator>) -> R, diff --git a/vortex-array/src/arrays/primitive/array/mod.rs b/vortex-array/src/arrays/primitive/array/mod.rs index c1bd0130eb9..2a4876d2ced 100644 --- a/vortex-array/src/arrays/primitive/array/mod.rs +++ b/vortex-array/src/arrays/primitive/array/mod.rs @@ -16,6 +16,7 @@ use vortex_error::vortex_err; use vortex_error::vortex_panic; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::array::Array; @@ -144,6 +145,7 @@ pub trait PrimitiveArrayExt: TypedArrayRef { } /// Narrow the array to the smallest possible integer type that can represent all values. + #[expect(deprecated)] fn narrow(&self) -> VortexResult { if !self.ptype().is_int() { return Ok(self.to_owned()); @@ -465,6 +467,7 @@ impl Array { } } + #[expect(deprecated)] pub fn map_each_with_validity(self, f: F) -> VortexResult where T: NativePType, @@ -524,6 +527,7 @@ impl PrimitiveData { } /// Create a PrimitiveArray from a byte buffer containing only the valid elements. + #[expect(deprecated)] pub fn from_values_byte_buffer( valid_elems_buffer: ByteBuffer, ptype: PType, diff --git a/vortex-array/src/arrays/primitive/array/patch.rs b/vortex-array/src/arrays/primitive/array/patch.rs index 51fae5e9cd0..8adee6a2c3f 100644 --- a/vortex-array/src/arrays/primitive/array/patch.rs +++ b/vortex-array/src/arrays/primitive/array/patch.rs @@ -135,6 +135,7 @@ mod tests { use vortex_buffer::buffer; use super::*; + #[allow(deprecated)] use crate::ToCanonical; use crate::assert_arrays_eq; use crate::validity::Validity; @@ -171,6 +172,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn patch_sliced() { let input = PrimitiveArray::new(buffer![2u32; 10], Validity::AllValid); let sliced = input.slice(2..8).unwrap(); diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index e5258bccf65..3c035920813 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -121,6 +121,7 @@ mod test { use crate::arrays::PrimitiveArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::compute::conformance::cast::test_cast_conformance; use crate::dtype::DType; @@ -129,6 +130,7 @@ mod test { use crate::validity::Validity; #[test] + #[expect(deprecated)] fn cast_u32_u8() { let arr = buffer![0u32, 10, 200].into_array(); @@ -181,6 +183,7 @@ mod test { } #[test] + #[expect(deprecated)] fn cast_u32_f32() { let arr = buffer![0u32, 10, 200].into_array(); let u8arr = arr.cast(PType::F32.into()).unwrap().to_primitive(); @@ -188,6 +191,7 @@ mod test { } #[test] + #[expect(deprecated)] fn cast_i32_u32() { let arr = buffer![-1i32].into_array(); let error = arr @@ -199,6 +203,7 @@ mod test { } #[test] + #[expect(deprecated)] fn cast_array_with_nulls_to_nonnullable() { let arr = PrimitiveArray::from_option_iter([Some(-1i32), None, Some(10)]); let err = arr @@ -215,6 +220,7 @@ mod test { } #[test] + #[expect(deprecated)] fn cast_with_invalid_nulls() { let arr = PrimitiveArray::new( buffer![-1i32, 0, 10], @@ -242,6 +248,7 @@ mod test { /// Same-width integer cast where all values fit: should reinterpret the /// buffer without allocation (pointer identity). #[test] + #[expect(deprecated)] fn cast_same_width_int_reinterprets_buffer() -> vortex_error::VortexResult<()> { let src = PrimitiveArray::from_iter([0u32, 10, 100]); let src_ptr = src.as_slice::().as_ptr(); @@ -258,6 +265,7 @@ mod test { /// Same-width integer cast where values don't fit: should fall through /// to the allocating path and produce an error. #[test] + #[expect(deprecated)] fn cast_same_width_int_out_of_range_errors() { let arr = buffer![u32::MAX].into_array(); let err = arr @@ -270,6 +278,7 @@ mod test { /// All-null array cast between same-width types should succeed without /// touching the buffer contents. #[test] + #[expect(deprecated)] fn cast_same_width_all_null() -> vortex_error::VortexResult<()> { let arr = PrimitiveArray::new(buffer![0xFFu8, 0xFF], Validity::AllInvalid); let casted = arr @@ -284,6 +293,7 @@ mod test { /// Same-width integer cast with nullable values: out-of-range nulls should /// not prevent the cast from succeeding. #[test] + #[expect(deprecated)] fn cast_same_width_int_nullable_with_out_of_range_nulls() -> vortex_error::VortexResult<()> { // The null position holds u32::MAX which doesn't fit in i32, but it's // masked as invalid so the cast should still succeed via reinterpret. @@ -303,6 +313,7 @@ mod test { } #[test] + #[expect(deprecated)] fn cast_u32_to_u8_with_out_of_range_nulls() -> vortex_error::VortexResult<()> { let arr = PrimitiveArray::new( buffer![1000u32, 10u32, 42u32], diff --git a/vortex-array/src/arrays/primitive/compute/fill_null.rs b/vortex-array/src/arrays/primitive/compute/fill_null.rs index 3ee48ce4c05..a377a2fb5bf 100644 --- a/vortex-array/src/arrays/primitive/compute/fill_null.rs +++ b/vortex-array/src/arrays/primitive/compute/fill_null.rs @@ -57,11 +57,13 @@ mod test { use crate::arrays::primitive::compute::fill_null::BoolArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::scalar::Scalar; use crate::validity::Validity; #[test] + #[expect(deprecated)] fn fill_null_leading_none() { let arr = PrimitiveArray::from_option_iter([None, Some(8u8), None, Some(10), None]); let p = arr @@ -81,6 +83,7 @@ mod test { } #[test] + #[expect(deprecated)] fn fill_null_all_none() { let arr = PrimitiveArray::from_option_iter([Option::::None, None, None, None, None]); @@ -101,6 +104,7 @@ mod test { } #[test] + #[expect(deprecated)] fn fill_null_nullable_non_null() { let arr = PrimitiveArray::new( buffer![8u8, 10, 12, 14, 16], @@ -123,6 +127,7 @@ mod test { } #[test] + #[expect(deprecated)] fn fill_null_non_nullable() { let arr = buffer![8u8, 10, 12, 14, 16].into_array(); let p = arr.fill_null(Scalar::from(255u8)).unwrap().to_primitive(); diff --git a/vortex-array/src/arrays/struct_/compute/cast.rs b/vortex-array/src/arrays/struct_/compute/cast.rs index 5e63cdc2092..e0f4aead1a1 100644 --- a/vortex-array/src/arrays/struct_/compute/cast.rs +++ b/vortex-array/src/arrays/struct_/compute/cast.rs @@ -91,6 +91,7 @@ mod tests { use vortex_buffer::buffer; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::PrimitiveArray; use crate::arrays::StructArray; @@ -193,6 +194,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn cast_duplicate_field_names_to_nullable() { let names = FieldNames::from(["a", "a"]); let field1 = buffer![1i32, 2, 3].into_array(); @@ -213,6 +215,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn cast_add_fields() { let names = FieldNames::from(["a", "b"]); let field1 = buffer![1i32, 2, 3].into_array(); diff --git a/vortex-array/src/arrays/struct_/compute/rules.rs b/vortex-array/src/arrays/struct_/compute/rules.rs index 91518ca7693..33f27829b75 100644 --- a/vortex-array/src/arrays/struct_/compute/rules.rs +++ b/vortex-array/src/arrays/struct_/compute/rules.rs @@ -153,6 +153,7 @@ mod tests { use crate::arrays::struct_::compute::rules::ConstantArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::FieldNames; @@ -163,6 +164,7 @@ mod tests { use crate::validity::Validity; #[test] + #[expect(deprecated)] fn test_struct_cast_field_reorder() { // Source: {a, b}, Target: {c, b, a} - reordered + new null field let source = StructArray::try_new( @@ -230,6 +232,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn cast_struct_drop_field() { // Casting to a struct with a subset of fields should succeed. let source = StructArray::try_new( @@ -268,6 +271,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn cast_struct_field_type_widening() { // Casting struct fields to wider types (i32 -> i64). let source = StructArray::try_new( diff --git a/vortex-array/src/arrays/varbin/accessor.rs b/vortex-array/src/arrays/varbin/accessor.rs index aa84ac64421..d093faa5d71 100644 --- a/vortex-array/src/arrays/varbin/accessor.rs +++ b/vortex-array/src/arrays/varbin/accessor.rs @@ -5,6 +5,7 @@ use std::iter; use vortex_error::VortexExpect; +#[allow(deprecated)] use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinArray; @@ -13,6 +14,7 @@ use crate::match_each_integer_ptype; use crate::validity::Validity; impl ArrayAccessor<[u8]> for VarBinArray { + #[expect(deprecated)] fn with_iterator(&self, f: F) -> R where F: for<'a> FnOnce(&mut dyn Iterator>) -> R, diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index fb8b2d54790..cf341f879ef 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -13,6 +13,7 @@ use vortex_error::vortex_err; use crate::ArrayRef; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::array::Array; @@ -177,6 +178,7 @@ impl VarBinData { /// Validates the components that would be used to create a `VarBinArray`. /// /// This function checks all the invariants required by `VarBinArray::new_unchecked`. + #[expect(deprecated)] pub fn validate( offsets: &ArrayRef, bytes: &BufferHandle, diff --git a/vortex-array/src/arrays/varbin/compute/compare.rs b/vortex-array/src/arrays/varbin/compute/compare.rs index 776f77a8796..5f74a4ac562 100644 --- a/vortex-array/src/arrays/varbin/compute/compare.rs +++ b/vortex-array/src/arrays/varbin/compute/compare.rs @@ -146,6 +146,7 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; @@ -159,6 +160,7 @@ mod test { use crate::scalar_fn::fns::operators::Operator; #[test] + #[expect(deprecated)] fn test_binary_compare() { let array = VarBinArray::from_iter( [Some(b"abc".to_vec()), None, Some(b"def".to_vec())], @@ -197,6 +199,7 @@ mod test { } #[test] + #[expect(deprecated)] fn varbinview_compare() { let array = VarBinArray::from_iter( [Some(b"abc".to_vec()), None, Some(b"def".to_vec())], diff --git a/vortex-array/src/arrays/varbin/vtable/canonical.rs b/vortex-array/src/arrays/varbin/vtable/canonical.rs index ecf651b3ea4..ffe56eb504e 100644 --- a/vortex-array/src/arrays/varbin/vtable/canonical.rs +++ b/vortex-array/src/arrays/varbin/vtable/canonical.rs @@ -44,6 +44,7 @@ pub(crate) fn varbin_to_canonical( } #[cfg(test)] +#[allow(deprecated)] mod tests { use rstest::rstest; diff --git a/vortex-array/src/arrays/varbinview/accessor.rs b/vortex-array/src/arrays/varbinview/accessor.rs index ef1470a090d..faf25350859 100644 --- a/vortex-array/src/arrays/varbinview/accessor.rs +++ b/vortex-array/src/arrays/varbinview/accessor.rs @@ -5,12 +5,14 @@ use std::iter; use vortex_error::VortexExpect; +#[allow(deprecated)] use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::validity::Validity; impl ArrayAccessor<[u8]> for VarBinViewArray { + #[expect(deprecated)] fn with_iterator FnOnce(&mut dyn Iterator>) -> R, R>( &self, f: F, diff --git a/vortex-array/src/arrays/varbinview/compute/mod.rs b/vortex-array/src/arrays/varbinview/compute/mod.rs index 772221f13ef..99bf4843fff 100644 --- a/vortex-array/src/arrays/varbinview/compute/mod.rs +++ b/vortex-array/src/arrays/varbinview/compute/mod.rs @@ -15,8 +15,10 @@ mod tests { use crate::IntoArray; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; + #[allow(deprecated)] use crate::canonical::ToCanonical; #[test] + #[expect(deprecated)] fn take_nullable() { let arr = VarBinViewArray::from_iter_nullable_str([ Some("one"), diff --git a/vortex-array/src/arrays/varbinview/compute/take.rs b/vortex-array/src/arrays/varbinview/compute/take.rs index e7b93bc79d6..38f65ff55b5 100644 --- a/vortex-array/src/arrays/varbinview/compute/take.rs +++ b/vortex-array/src/arrays/varbinview/compute/take.rs @@ -95,6 +95,7 @@ mod tests { use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::compute::take::PrimitiveArray; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::compute::conformance::take::test_take_conformance; use crate::dtype::DType; @@ -102,6 +103,7 @@ mod tests { use crate::validity::Validity; #[test] + #[expect(deprecated)] fn take_nullable() { let arr = VarBinViewArray::from_iter_nullable_str([ Some("one"), @@ -124,6 +126,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn take_nullable_indices() { let arr = VarBinViewArray::from_iter(["one", "two"].map(Some), DType::Utf8(NonNullable)); diff --git a/vortex-array/src/arrays/varbinview/compute/zip.rs b/vortex-array/src/arrays/varbinview/compute/zip.rs index 57f8aab8067..0ed1563a3d1 100644 --- a/vortex-array/src/arrays/varbinview/compute/zip.rs +++ b/vortex-array/src/arrays/varbinview/compute/zip.rs @@ -214,11 +214,13 @@ mod tests { use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::builtins::ArrayBuiltins; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; #[test] + #[expect(deprecated)] fn zip_varbinview_kernel_zips() { let a = VarBinViewArray::from_iter( [ diff --git a/vortex-array/src/arrays/varbinview/tests.rs b/vortex-array/src/arrays/varbinview/tests.rs index ab19e33dd59..8937844ef93 100644 --- a/vortex-array/src/arrays/varbinview/tests.rs +++ b/vortex-array/src/arrays/varbinview/tests.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors +#[allow(deprecated)] use crate::ToCanonical; use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::BinaryView; @@ -29,6 +30,7 @@ pub fn slice_array() { } #[test] +#[expect(deprecated)] pub fn flatten_array() { let binary_arr = VarBinViewArray::from_iter_str(["string1", "string2"]); let var_bin = binary_arr.as_array().to_varbinview(); diff --git a/vortex-array/src/arrow/record_batch.rs b/vortex-array/src/arrow/record_batch.rs index 02ec62f626a..f3a66b3a64c 100644 --- a/vortex-array/src/arrow/record_batch.rs +++ b/vortex-array/src/arrow/record_batch.rs @@ -23,6 +23,7 @@ use crate::validity::Validity; impl TryFrom<&ArrayRef> for RecordBatch { type Error = VortexError; + #[expect(deprecated)] fn try_from(value: &ArrayRef) -> VortexResult { let Canonical::Struct(struct_array) = value.to_canonical()? else { vortex_bail!("RecordBatch can only be constructed from ") diff --git a/vortex-array/src/builders/bool.rs b/vortex-array/src/builders/bool.rs index 5cf2f0fa9fe..0a65b91541f 100644 --- a/vortex-array/src/builders/bool.rs +++ b/vortex-array/src/builders/bool.rs @@ -20,6 +20,7 @@ use crate::builders::ArrayBuilder; use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::canonical::Canonical; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; @@ -114,6 +115,7 @@ impl ArrayBuilder for BoolBuilder { Ok(()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let bool_array = array.to_bool(); @@ -168,6 +170,7 @@ mod tests { use crate::builders::BoolBuilder; use crate::builders::bool::BoolArray; use crate::builders::builder_with_capacity; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; @@ -190,6 +193,7 @@ mod tests { .into_array() } + #[expect(deprecated)] #[test] fn tests() -> VortexResult<()> { let len = 1000; diff --git a/vortex-array/src/builders/decimal.rs b/vortex-array/src/builders/decimal.rs index d009fd451c9..1419babc620 100644 --- a/vortex-array/src/builders/decimal.rs +++ b/vortex-array/src/builders/decimal.rs @@ -14,6 +14,7 @@ use vortex_mask::Mask; use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::DecimalArray; @@ -194,6 +195,7 @@ impl ArrayBuilder for DecimalBuilder { Ok(()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let decimal_array = array.to_decimal(); diff --git a/vortex-array/src/builders/dict/bytes.rs b/vortex-array/src/builders/dict/bytes.rs index 155d0b1db9a..97151c68168 100644 --- a/vortex-array/src/builders/dict/bytes.rs +++ b/vortex-array/src/builders/dict/bytes.rs @@ -25,6 +25,7 @@ use crate::arrays::VarBin; use crate::arrays::VarBinView; use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::build_views::BinaryView; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::PType; @@ -172,7 +173,9 @@ impl DictEncoder for BytesDictBuilder { } else { // NOTE(aduffy): it is very rare that this path would be taken, only e.g. // if we're performing dictionary encoding downstream of some other compression. - self.encode_bytes(&array.to_varbinview(), len) + #[expect(deprecated)] + let varbinview = array.to_varbinview(); + self.encode_bytes(&varbinview, len) } } @@ -204,12 +207,14 @@ mod test { use std::str; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinArray; use crate::arrays::dict::DictArraySlotsExt; use crate::builders::dict::dict_encode; + #[expect(deprecated)] #[test] fn encode_varbin() { let arr = VarBinArray::from(vec!["hello", "world", "hello", "again", "world"]); @@ -228,6 +233,7 @@ mod test { }); } + #[expect(deprecated)] #[test] fn encode_varbin_nulls() { let arr: VarBinArray = vec![ @@ -256,6 +262,7 @@ mod test { }); } + #[expect(deprecated)] #[test] fn repeated_values() { let arr = VarBinArray::from(vec!["a", "a", "b", "b", "a", "b", "a", "b"]); diff --git a/vortex-array/src/builders/dict/mod.rs b/vortex-array/src/builders/dict/mod.rs index aa24000ac20..66fc2958952 100644 --- a/vortex-array/src/builders/dict/mod.rs +++ b/vortex-array/src/builders/dict/mod.rs @@ -9,6 +9,7 @@ use vortex_error::vortex_panic; use crate::ArrayRef; use crate::IntoArray; +#[allow(deprecated)] use crate::ToCanonical; use crate::arrays::DictArray; use crate::arrays::Primitive; @@ -66,6 +67,7 @@ pub fn dict_encode_with_constraints( constraints: &DictConstraints, ) -> VortexResult { let mut encoder = dict_encoder(array, constraints); + #[expect(deprecated)] let codes = encoder.encode(array).to_primitive().narrow()?; // SAFETY: The encoding process will produce a value set of codes and values // All values in the dictionary are guaranteed to be referenced by at least one code diff --git a/vortex-array/src/builders/dict/primitive.rs b/vortex-array/src/builders/dict/primitive.rs index d4ae633c202..0476846cd59 100644 --- a/vortex-array/src/builders/dict/primitive.rs +++ b/vortex-array/src/builders/dict/primitive.rs @@ -15,6 +15,7 @@ use super::DictConstraints; use super::DictEncoder; use crate::ArrayRef; use crate::IntoArray; +#[allow(deprecated)] use crate::ToCanonical; use crate::accessor::ArrayAccessor; use crate::arrays::PrimitiveArray; @@ -122,6 +123,7 @@ where NativeValue: Hash + Eq, Code: UnsignedPType, { + #[expect(deprecated)] fn encode(&mut self, array: &ArrayRef) -> ArrayRef { let mut codes = BufferMut::::with_capacity(array.len()); diff --git a/vortex-array/src/builders/extension.rs b/vortex-array/src/builders/extension.rs index ae540c1a6c2..1aa866ac0fc 100644 --- a/vortex-array/src/builders/extension.rs +++ b/vortex-array/src/builders/extension.rs @@ -15,6 +15,7 @@ use crate::builders::ArrayBuilder; use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::builder_with_capacity; use crate::canonical::Canonical; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::extension::ExtDTypeRef; @@ -98,6 +99,7 @@ impl ArrayBuilder for ExtensionBuilder { self.append_value(scalar.as_extension()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let ext_array = array.to_extension(); self.storage.extend_from_array(ext_array.storage_array()) diff --git a/vortex-array/src/builders/fixed_size_list.rs b/vortex-array/src/builders/fixed_size_list.rs index b561cb3ed5f..e37f15a0cd0 100644 --- a/vortex-array/src/builders/fixed_size_list.rs +++ b/vortex-array/src/builders/fixed_size_list.rs @@ -22,6 +22,7 @@ use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::builders::builder_with_capacity; use crate::canonical::Canonical; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; @@ -236,6 +237,7 @@ impl ArrayBuilder for FixedSizeListBuilder { /// This will increase the capacity if extending with this `array` would go past the original /// capacity. + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let fsl = array.to_fixed_size_list(); if fsl.is_empty() { @@ -282,6 +284,7 @@ mod tests { use super::FixedSizeListBuilder; use crate::IntoArray as _; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::PrimitiveArray; @@ -304,6 +307,7 @@ mod tests { assert_eq!(fsl.len(), 0); } + #[expect(deprecated)] #[test] fn test_values() { let dtype: Arc = Arc::new(I32.into()); @@ -340,6 +344,7 @@ mod tests { assert_eq!(fsl_array.list_size(), 3); } + #[expect(deprecated)] #[test] fn test_degenerate_size_zero_non_nullable() { let dtype: Arc = Arc::new(I32.into()); @@ -364,6 +369,7 @@ mod tests { assert_eq!(fsl_array.elements().len(), 0); } + #[expect(deprecated)] #[test] fn test_degenerate_size_zero_nullable() { // Use nullable elements since we'll be appending nulls @@ -392,6 +398,7 @@ mod tests { assert_eq!(fsl_array.elements().len(), 0); } + #[expect(deprecated)] #[test] fn test_capacity_growth() { let dtype: Arc = Arc::new(I32.into()); @@ -420,6 +427,7 @@ mod tests { assert_eq!(fsl_array.elements().len(), 10); } + #[expect(deprecated)] #[test] fn test_large_size_zero_capacity_empty_result() { let dtype: Arc = Arc::new(I32.into()); @@ -434,6 +442,7 @@ mod tests { assert_eq!(fsl_array.elements().len(), 0); } + #[expect(deprecated)] #[test] fn test_nullable_lists_non_nullable_elements() { let dtype: Arc = Arc::new(DType::Primitive(I32, NonNullable)); @@ -485,6 +494,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_non_nullable_lists_nullable_elements() { let dtype: Arc = Arc::new(DType::Primitive(I32, Nullable)); @@ -528,6 +538,7 @@ mod tests { assert_eq!(fsl_array.elements().len(), 6); } + #[expect(deprecated)] #[test] fn test_append_zeros() { let dtype: Arc = Arc::new(I32.into()); @@ -548,6 +559,7 @@ mod tests { assert!(elements.iter().all(|&x| x == 0)); } + #[expect(deprecated)] #[test] fn test_append_nulls() { // Elements must be nullable if we're going to append null lists @@ -576,6 +588,7 @@ mod tests { } } + #[expect(deprecated)] #[test] fn test_append_scalar_nulls() { // Elements must be nullable if we're going to append null lists @@ -604,6 +617,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_append_zeros_degenerate() { let dtype: Arc = Arc::new(I32.into()); @@ -646,6 +660,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_extend_from_array() { let dtype: Arc = Arc::new(I32.into()); @@ -715,6 +730,7 @@ mod tests { ); } + #[expect(deprecated)] #[test] fn test_extend_degenerate_arrays() { let dtype: Arc = Arc::new(I32.into()); @@ -818,6 +834,7 @@ mod tests { assert_eq!(fsl.len(), 1); } + #[expect(deprecated)] #[test] fn test_mixed_operations() { // Use nullable elements since we'll be appending nulls @@ -974,6 +991,7 @@ mod tests { assert!(builder.append_scalar(&wrong_scalar).is_err()); } + #[expect(deprecated)] #[test] fn test_append_array_as_list() { let dtype: Arc = Arc::new(I32.into()); diff --git a/vortex-array/src/builders/list.rs b/vortex-array/src/builders/list.rs index 511f2120f1f..d75f7f1ac0f 100644 --- a/vortex-array/src/builders/list.rs +++ b/vortex-array/src/builders/list.rs @@ -23,6 +23,7 @@ use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::builders::PrimitiveBuilder; use crate::builders::builder_with_capacity; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::IntegerPType; @@ -216,6 +217,7 @@ impl ArrayBuilder for ListBuilder { self.append_value(scalar.as_list()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let list = array.to_listview(); if list.is_empty() { @@ -304,6 +306,7 @@ impl ArrayBuilder for ListBuilder { self.finish_into_list().into_array() } + #[expect(deprecated)] fn finish_into_canonical(&mut self) -> Canonical { Canonical::List(self.finish_into_list().into_array().to_listview()) } @@ -320,6 +323,7 @@ mod tests { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::ChunkedArray; use crate::arrays::PrimitiveArray; @@ -346,6 +350,7 @@ mod tests { assert_eq!(list.len(), 0); } + #[expect(deprecated)] #[test] fn test_values() { let dtype: Arc = Arc::new(I32.into()); @@ -394,6 +399,7 @@ mod tests { ) } + #[expect(deprecated)] #[test] fn test_nullable_values() { let dtype: Arc = Arc::new(I32.into()); @@ -435,6 +441,7 @@ mod tests { assert_eq!(list_array.list_elements_at(2).unwrap().len(), 3); } + #[expect(deprecated)] fn test_extend_builder_gen() { let list = ListArray::from_iter_opt_slow::( [Some(vec![0, 1, 2]), None, Some(vec![4, 5])], @@ -500,6 +507,7 @@ mod tests { test_extend_builder_gen::(); } + #[expect(deprecated)] #[test] pub fn test_array_with_gap() { let one_trailing_unused_element = ListArray::try_new( diff --git a/vortex-array/src/builders/listview.rs b/vortex-array/src/builders/listview.rs index c2f5c1471ee..b738e1e8ea4 100644 --- a/vortex-array/src/builders/listview.rs +++ b/vortex-array/src/builders/listview.rs @@ -21,6 +21,7 @@ use vortex_mask::Mask; use crate::ArrayRef; use crate::Canonical; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::array::IntoArray; @@ -292,6 +293,7 @@ impl ArrayBuilder for ListViewBuilder { self.append_value(list_scalar) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let listview = array.to_listview(); if listview.is_empty() { diff --git a/vortex-array/src/builders/primitive.rs b/vortex-array/src/builders/primitive.rs index 93c50b130ca..9df78d28032 100644 --- a/vortex-array/src/builders/primitive.rs +++ b/vortex-array/src/builders/primitive.rs @@ -19,6 +19,7 @@ use crate::builders::ArrayBuilder; use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::canonical::Canonical; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::NativePType; @@ -176,6 +177,7 @@ impl ArrayBuilder for PrimitiveBuilder { Ok(()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let array = array.to_primitive(); diff --git a/vortex-array/src/builders/struct_.rs b/vortex-array/src/builders/struct_.rs index f37b88d7c80..ef60acbcab3 100644 --- a/vortex-array/src/builders/struct_.rs +++ b/vortex-array/src/builders/struct_.rs @@ -22,6 +22,7 @@ use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::builders::builder_with_capacity; use crate::canonical::Canonical; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Nullability; @@ -167,6 +168,7 @@ impl ArrayBuilder for StructBuilder { self.append_value(scalar.as_struct()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let array = array.to_struct(); diff --git a/vortex-array/src/builders/tests.rs b/vortex-array/src/builders/tests.rs index 749b5abdad2..694e8f2734d 100644 --- a/vortex-array/src/builders/tests.rs +++ b/vortex-array/src/builders/tests.rs @@ -221,6 +221,7 @@ fn test_append_defaults_behavior(#[case] dtype: DType, #[case] should_be_null: b /// Helper function that fills two builders with the same values and compares the results /// of `to_canonical()` vs `finish().to_canonical()`. +#[expect(deprecated)] fn compare_to_canonical_methods(dtype: &DType, mut fill_builder: F) where F: FnMut(&mut dyn ArrayBuilder), diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index c1e5fd6f6d6..081e064787f 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -28,6 +28,7 @@ use crate::arrays::varbinview::compact::BufferUtilization; use crate::builders::ArrayBuilder; use crate::builders::LazyBitBufferBuilder; use crate::canonical::Canonical; +#[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::scalar::Scalar; @@ -293,6 +294,7 @@ impl ArrayBuilder for VarBinViewBuilder { Ok(()) } + #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { let array = array.to_varbinview(); self.flush_in_progress(); diff --git a/vortex-array/src/canonical.rs b/vortex-array/src/canonical.rs index ffae20f09c8..4badaa13dc2 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -425,41 +425,52 @@ impl IntoArray for Canonical { /// # Canonicalization /// /// This trait has a blanket implementation for all types implementing [ToCanonical]. +#[deprecated(note = "use `array.execute::(ctx)` instead")] pub trait ToCanonical { /// Canonicalize into a [`NullArray`] if the target is [`Null`](DType::Null) typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_null(&self) -> NullArray; /// Canonicalize into a [`BoolArray`] if the target is [`Bool`](DType::Bool) typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_bool(&self) -> BoolArray; /// Canonicalize into a [`PrimitiveArray`] if the target is [`Primitive`](DType::Primitive) /// typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_primitive(&self) -> PrimitiveArray; /// Canonicalize into a [`DecimalArray`] if the target is [`Decimal`](DType::Decimal) /// typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_decimal(&self) -> DecimalArray; /// Canonicalize into a [`StructArray`] if the target is [`Struct`](DType::Struct) typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_struct(&self) -> StructArray; /// Canonicalize into a [`ListViewArray`] if the target is [`List`](DType::List) typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_listview(&self) -> ListViewArray; /// Canonicalize into a [`FixedSizeListArray`] if the target is [`List`](DType::FixedSizeList) /// typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_fixed_size_list(&self) -> FixedSizeListArray; /// Canonicalize into a [`VarBinViewArray`] if the target is [`Utf8`](DType::Utf8) /// or [`Binary`](DType::Binary) typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_varbinview(&self) -> VarBinViewArray; /// Canonicalize into an [`ExtensionArray`] if the array is [`Extension`](DType::Extension) /// typed. + #[deprecated(note = "use `array.execute::(ctx)` instead")] fn to_extension(&self) -> ExtensionArray; } // Blanket impl for all Array encodings. +#[allow(deprecated)] impl ToCanonical for ArrayRef { fn to_null(&self) -> NullArray { self.to_canonical() diff --git a/vortex-array/src/compute/conformance/binary_numeric.rs b/vortex-array/src/compute/conformance/binary_numeric.rs index 5f5588ec273..b4240fb2db2 100644 --- a/vortex-array/src/compute/conformance/binary_numeric.rs +++ b/vortex-array/src/compute/conformance/binary_numeric.rs @@ -31,6 +31,7 @@ use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; use crate::RecursiveCanonical; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; @@ -88,6 +89,7 @@ where test_binary_numeric_edge_cases(array); } +#[expect(deprecated)] fn test_standard_binary_numeric(array: ArrayRef) where Scalar: From, @@ -323,6 +325,7 @@ where test_binary_numeric_with_scalar(array, T::neg_infinity()); } +#[expect(deprecated)] fn test_binary_numeric_with_scalar(array: ArrayRef, scalar_value: T) where T: NativePType + Num + Copy + std::fmt::Debug, diff --git a/vortex-array/src/compute/conformance/consistency.rs b/vortex-array/src/compute/conformance/consistency.rs index 1817588c1f2..ee3b0dffe2c 100644 --- a/vortex-array/src/compute/conformance/consistency.rs +++ b/vortex-array/src/compute/conformance/consistency.rs @@ -1008,6 +1008,7 @@ fn test_boolean_demorgan_consistency(array: &ArrayRef) { /// # Why This Matters /// Aggregate operations on sliced arrays must produce correct results /// regardless of the underlying encoding's offset handling. +#[expect(deprecated)] fn test_slice_aggregate_consistency(array: &ArrayRef) { use crate::aggregate_fn::fns::min_max::min_max; use crate::aggregate_fn::fns::nan_count::nan_count; @@ -1119,6 +1120,7 @@ fn test_slice_aggregate_consistency(array: &ArrayRef) { /// This test specifically catches bugs where encodings (like RunEndArray) fail to preserve /// offset information during cast operations. Such bugs can lead to incorrect data being /// returned after casting a sliced array. +#[expect(deprecated)] fn test_cast_slice_consistency(array: &ArrayRef) { let len = array.len(); if len < 5 { diff --git a/vortex-array/src/compute/conformance/take.rs b/vortex-array/src/compute/conformance/take.rs index aa41da6942a..2f703700ca8 100644 --- a/vortex-array/src/compute/conformance/take.rs +++ b/vortex-array/src/compute/conformance/take.rs @@ -53,6 +53,7 @@ pub fn test_take_conformance(array: &ArrayRef) { } } +#[expect(deprecated)] fn test_take_all(array: &ArrayRef) { let len = array.len(); let indices = PrimitiveArray::from_iter(0..len as u64); diff --git a/vortex-array/src/display/mod.rs b/vortex-array/src/display/mod.rs index 861d24e3538..f0d9e64d61c 100644 --- a/vortex-array/src/display/mod.rs +++ b/vortex-array/src/display/mod.rs @@ -521,6 +521,7 @@ impl ArrayRef { DisplayArrayAs(self, DisplayOptions::TableDisplay) } + #[expect(deprecated)] fn fmt_as(&self, f: &mut std::fmt::Formatter, options: &DisplayOptions) -> std::fmt::Result { match options { DisplayOptions::MetadataOnly => EncodingSummaryExtractor::write(self, f), @@ -579,6 +580,7 @@ impl ArrayRef { } #[cfg(feature = "table-display")] DisplayOptions::TableDisplay => { + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; diff --git a/vortex-array/src/normalize.rs b/vortex-array/src/normalize.rs index f4c1d8c5a8f..3afca054fa1 100644 --- a/vortex-array/src/normalize.rs +++ b/vortex-array/src/normalize.rs @@ -197,6 +197,7 @@ mod tests { } #[test] + #[expect(deprecated)] fn normalize_slice_of_dict_returns_dict() -> VortexResult<()> { let codes = PrimitiveArray::from_iter(vec![0u32, 1, 0, 1, 2]).into_array(); let values = PrimitiveArray::from_iter(vec![10i32, 20, 30]).into_array(); diff --git a/vortex-array/src/patches.rs b/vortex-array/src/patches.rs index 000ea495815..bcd1a3821d9 100644 --- a/vortex-array/src/patches.rs +++ b/vortex-array/src/patches.rs @@ -22,6 +22,7 @@ use crate::ArrayRef; use crate::ExecutionCtx; use crate::IntoArray; use crate::LEGACY_SESSION; +#[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::PrimitiveArray; @@ -405,6 +406,7 @@ impl Patches { /// # Returns /// [`SearchResult::Found`] with the position if needle exists, or [`SearchResult::NotFound`] /// with the insertion point if not found. + #[expect(deprecated)] fn search_index_binary_search(indices: &ArrayRef, needle: usize) -> VortexResult { if indices.is_canonical() { let primitive = indices.to_primitive(); @@ -1115,6 +1117,7 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::assert_arrays_eq; @@ -1147,6 +1150,7 @@ mod test { } #[test] + #[expect(deprecated)] fn take_with_nulls() { let patches = Patches::new( 20, @@ -1188,6 +1192,7 @@ mod test { } #[test] + #[expect(deprecated)] fn take_search_with_nulls_chunked() { let patches = Patches::new( 20, @@ -1476,6 +1481,7 @@ mod test { } #[test] + #[expect(deprecated)] fn test_mask_nullable_values() { let patches = Patches::new( 10, @@ -1664,6 +1670,7 @@ mod test { } #[test] + #[expect(deprecated)] fn test_patch_values() { let patches = Patches::new( 10, diff --git a/vortex-array/src/scalar_fn/fns/between/mod.rs b/vortex-array/src/scalar_fn/fns/between/mod.rs index 0cf591824e5..ce365054a39 100644 --- a/vortex-array/src/scalar_fn/fns/between/mod.rs +++ b/vortex-array/src/scalar_fn/fns/between/mod.rs @@ -324,6 +324,8 @@ impl ScalarFnVTable for Between { #[cfg(test)] mod tests { + #![allow(deprecated)] + use rstest::rstest; use vortex_buffer::buffer; diff --git a/vortex-array/src/scalar_fn/fns/binary/boolean.rs b/vortex-array/src/scalar_fn/fns/binary/boolean.rs index b6894fd2887..b8b43c52855 100644 --- a/vortex-array/src/scalar_fn/fns/binary/boolean.rs +++ b/vortex-array/src/scalar_fn/fns/binary/boolean.rs @@ -102,6 +102,8 @@ fn constant_boolean( #[cfg(test)] mod tests { + #![allow(deprecated)] + use rstest::rstest; use crate::ArrayRef; diff --git a/vortex-array/src/scalar_fn/fns/binary/compare.rs b/vortex-array/src/scalar_fn/fns/binary/compare.rs index 6447e0c1638..b064ad053dc 100644 --- a/vortex-array/src/scalar_fn/fns/binary/compare.rs +++ b/vortex-array/src/scalar_fn/fns/binary/compare.rs @@ -250,6 +250,7 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; + #[allow(deprecated)] use crate::ToCanonical; use crate::VortexSessionExecute; use crate::arrays::BoolArray; @@ -278,6 +279,7 @@ mod tests { use crate::validity::Validity; #[test] + #[expect(deprecated)] fn test_bool_basic_comparisons() { use vortex_buffer::BitBuffer; diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index 27d60663c1d..416257dd2d3 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -461,6 +461,7 @@ mod tests { use crate::arrays::ListArray; use crate::arrays::VarBinArray; use crate::assert_arrays_eq; + #[allow(deprecated)] use crate::canonical::ToCanonical; use crate::dtype::DType; use crate::dtype::Field; @@ -710,6 +711,7 @@ mod tests { // -- Tests migrated from compute/list_contains.rs -- + #[expect(deprecated)] fn nonnull_strings(values: Vec>) -> ArrayRef { ListArray::from_iter_slow::(values, Arc::new(DType::Utf8(Nullability::NonNullable))) .unwrap() @@ -717,6 +719,7 @@ mod tests { .into_array() } + #[expect(deprecated)] fn null_strings(values: Vec>>) -> ArrayRef { let elements = values.iter().flatten().cloned().collect_vec(); diff --git a/vortex-array/src/scalar_fn/fns/merge.rs b/vortex-array/src/scalar_fn/fns/merge.rs index 01445eb6c54..dc89e07022d 100644 --- a/vortex-array/src/scalar_fn/fns/merge.rs +++ b/vortex-array/src/scalar_fn/fns/merge.rs @@ -291,6 +291,7 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::PrimitiveArray; use crate::arrays::struct_::StructArrayExt; @@ -310,6 +311,7 @@ mod tests { use crate::scalar_fn::fns::merge::StructArray; use crate::scalar_fn::fns::pack::Pack; + #[expect(deprecated)] fn primitive_field(array: &ArrayRef, field_path: &[&str]) -> VortexResult { let mut field_path = field_path.iter(); @@ -454,6 +456,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn test_nested_merge() { // Nested structs are not merged! @@ -507,6 +510,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn test_merge_order() { let expr = merge(vec![get_item("0", root()), get_item("1", root())]); diff --git a/vortex-array/src/scalar_fn/fns/not/mod.rs b/vortex-array/src/scalar_fn/fns/not/mod.rs index bdf7fdd9e76..73cd0ecb270 100644 --- a/vortex-array/src/scalar_fn/fns/not/mod.rs +++ b/vortex-array/src/scalar_fn/fns/not/mod.rs @@ -122,6 +122,7 @@ impl ScalarFnVTable for Not { #[cfg(test)] mod tests { use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::bool::BoolArrayExt; use crate::dtype::DType; @@ -134,6 +135,7 @@ mod tests { use crate::scalar_fn::fns::not::BoolArray; #[test] + #[expect(deprecated)] fn invert_booleans() { let not_expr = not(root()); let bools = BoolArray::from_iter([false, true, false, false, true, true]); diff --git a/vortex-array/src/scalar_fn/fns/pack.rs b/vortex-array/src/scalar_fn/fns/pack.rs index 13626bb107b..f76696fdf35 100644 --- a/vortex-array/src/scalar_fn/fns/pack.rs +++ b/vortex-array/src/scalar_fn/fns/pack.rs @@ -168,6 +168,7 @@ mod tests { use super::PackOptions; use crate::ArrayRef; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::PrimitiveArray; use crate::arrays::struct_::StructArrayExt; @@ -188,6 +189,7 @@ mod tests { .into_array() } + #[expect(deprecated)] fn primitive_field(array: &ArrayRef, field_path: &[&str]) -> VortexResult { let mut field_path = field_path.iter(); @@ -203,6 +205,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn test_empty_pack() { let expr = Pack.new_expr( PackOptions { @@ -219,6 +222,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn test_simple_pack() { let expr = Pack.new_expr( PackOptions { @@ -248,6 +252,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn test_nested_pack() { let expr = Pack.new_expr( PackOptions { @@ -290,6 +295,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn test_pack_nullable() { let expr = Pack.new_expr( PackOptions { diff --git a/vortex-array/src/scalar_fn/fns/select.rs b/vortex-array/src/scalar_fn/fns/select.rs index c08f88f23cb..602c8f3866b 100644 --- a/vortex-array/src/scalar_fn/fns/select.rs +++ b/vortex-array/src/scalar_fn/fns/select.rs @@ -307,6 +307,7 @@ mod tests { use vortex_buffer::buffer; use crate::IntoArray; + #[allow(deprecated)] use crate::ToCanonical; use crate::arrays::struct_::StructArrayExt; use crate::dtype::DType; @@ -332,6 +333,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn include_columns() { let st = test_array(); let select = select(vec![FieldName::from("a")], root()); @@ -341,6 +343,7 @@ mod tests { } #[test] + #[expect(deprecated)] pub fn exclude_columns() { let st = test_array(); let select = select_exclude(vec![FieldName::from("a")], root()); From b7539df1c2a3b3a23a79a5eaac9700da89af2548 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 12:04:15 -0400 Subject: [PATCH 2/8] deprecate all decompression methods without a context Signed-off-by: Joe Isaacs --- vortex-array/benches/take_patches.rs | 4 ++-- vortex-array/benches/varbinview_compact.rs | 4 ++-- vortex-array/src/arrays/arbitrary.rs | 4 ++-- vortex-array/src/arrays/bool/compute/fill_null.rs | 5 +++-- vortex-array/src/arrays/bool/compute/take.rs | 4 ++-- vortex-array/src/arrays/bool/vtable/operations.rs | 4 ++-- vortex-array/src/arrays/chunked/compute/take.rs | 4 ++-- vortex-array/src/arrays/chunked/compute/zip.rs | 4 ++-- vortex-array/src/arrays/chunked/paired_chunks.rs | 4 ++-- vortex-array/src/arrays/chunked/tests.rs | 4 ++-- vortex-array/src/arrays/chunked/vtable/canonical.rs | 4 ++-- vortex-array/src/arrays/chunked/vtable/mod.rs | 4 ++-- vortex-array/src/arrays/constant/compute/take.rs | 4 ++-- vortex-array/src/arrays/constant/vtable/canonical.rs | 4 ++-- vortex-array/src/arrays/datetime/test.rs | 4 ++-- vortex-array/src/arrays/decimal/compute/cast.rs | 4 ++-- vortex-array/src/arrays/decimal/compute/fill_null.rs | 4 ++-- vortex-array/src/arrays/dict/array.rs | 8 ++++---- vortex-array/src/arrays/dict/compute/cast.rs | 4 ++-- vortex-array/src/arrays/dict/compute/fill_null.rs | 4 ++-- vortex-array/src/arrays/dict/compute/mod.rs | 4 ++-- vortex-array/src/arrays/extension/compute/rules.rs | 4 ++-- vortex-array/src/arrays/filter/execute/bool.rs | 4 ++-- vortex-array/src/arrays/filter/execute/listview.rs | 4 ++-- vortex-array/src/arrays/filter/execute/primitive.rs | 4 ++-- .../src/arrays/fixed_size_list/tests/nested.rs | 4 ++-- vortex-array/src/arrays/list/compute/take.rs | 4 ++-- vortex-array/src/arrays/listview/array.rs | 4 ++-- vortex-array/src/arrays/listview/conversion.rs | 4 ++-- vortex-array/src/arrays/listview/rebuild.rs | 8 ++++---- vortex-array/src/arrays/listview/tests/filter.rs | 4 ++-- vortex-array/src/arrays/listview/tests/operations.rs | 7 ++----- vortex-array/src/arrays/listview/tests/take.rs | 4 ++-- vortex-array/src/arrays/masked/tests.rs | 2 +- vortex-array/src/arrays/null/compute/mod.rs | 4 ++-- vortex-array/src/arrays/null/compute/take.rs | 4 ++-- vortex-array/src/arrays/primitive/array/accessor.rs | 4 ++-- vortex-array/src/arrays/primitive/array/mod.rs | 4 ++-- vortex-array/src/arrays/primitive/array/patch.rs | 4 ++-- vortex-array/src/arrays/primitive/compute/cast.rs | 4 ++-- .../src/arrays/primitive/compute/fill_null.rs | 4 ++-- vortex-array/src/arrays/struct_/compute/cast.rs | 4 ++-- vortex-array/src/arrays/struct_/compute/rules.rs | 4 ++-- vortex-array/src/arrays/varbin/accessor.rs | 4 ++-- vortex-array/src/arrays/varbin/array.rs | 4 ++-- vortex-array/src/arrays/varbin/compute/compare.rs | 4 ++-- vortex-array/src/arrays/varbin/vtable/canonical.rs | 5 +++-- vortex-array/src/arrays/varbinview/accessor.rs | 4 ++-- vortex-array/src/arrays/varbinview/compute/mod.rs | 4 ++-- vortex-array/src/arrays/varbinview/compute/take.rs | 4 ++-- vortex-array/src/arrays/varbinview/compute/zip.rs | 4 ++-- vortex-array/src/arrays/varbinview/tests.rs | 4 ++-- vortex-array/src/builders/bool.rs | 8 ++++---- vortex-array/src/builders/decimal.rs | 4 ++-- vortex-array/src/builders/dict/bytes.rs | 8 ++++---- vortex-array/src/builders/dict/mod.rs | 4 ++-- vortex-array/src/builders/dict/primitive.rs | 4 ++-- vortex-array/src/builders/extension.rs | 4 ++-- vortex-array/src/builders/fixed_size_list.rs | 8 ++++---- vortex-array/src/builders/list.rs | 8 ++++---- vortex-array/src/builders/listview.rs | 4 ++-- vortex-array/src/builders/primitive.rs | 4 ++-- vortex-array/src/builders/struct_.rs | 4 ++-- vortex-array/src/builders/varbinview.rs | 4 ++-- vortex-array/src/canonical.rs | 11 ++++++++++- .../src/compute/conformance/binary_numeric.rs | 4 ++-- vortex-array/src/display/mod.rs | 4 ++-- vortex-array/src/patches.rs | 8 ++++---- vortex-array/src/scalar_fn/fns/between/mod.rs | 4 ++-- vortex-array/src/scalar_fn/fns/binary/boolean.rs | 4 ++-- vortex-array/src/scalar_fn/fns/binary/compare.rs | 4 ++-- vortex-array/src/scalar_fn/fns/list_contains/mod.rs | 4 ++-- vortex-array/src/scalar_fn/fns/merge.rs | 4 ++-- vortex-array/src/scalar_fn/fns/not/mod.rs | 4 ++-- vortex-array/src/scalar_fn/fns/pack.rs | 4 ++-- vortex-array/src/scalar_fn/fns/select.rs | 4 ++-- 76 files changed, 175 insertions(+), 167 deletions(-) diff --git a/vortex-array/benches/take_patches.rs b/vortex-array/benches/take_patches.rs index 04d7fbccb80..0d9ff1ae05f 100644 --- a/vortex-array/benches/take_patches.rs +++ b/vortex-array/benches/take_patches.rs @@ -11,8 +11,8 @@ use rand::rngs::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; -#[allow(deprecated)] -use vortex_array::ToCanonical; +#[expect(deprecated)] +use vortex_array::ToCanonical as _; use vortex_array::VortexSessionExecute; use vortex_array::patches::Patches; use vortex_buffer::Buffer; diff --git a/vortex-array/benches/varbinview_compact.rs b/vortex-array/benches/varbinview_compact.rs index 59e4bc936ce..895289b1a0d 100644 --- a/vortex-array/benches/varbinview_compact.rs +++ b/vortex-array/benches/varbinview_compact.rs @@ -7,8 +7,8 @@ use rand::SeedableRng; use rand::rngs::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; -#[allow(deprecated)] -use vortex_array::ToCanonical; +#[expect(deprecated)] +use vortex_array::ToCanonical as _; use vortex_array::arrays::VarBinViewArray; use vortex_array::builders::VarBinViewBuilder; use vortex_array::dtype::DType; diff --git a/vortex-array/src/arrays/arbitrary.rs b/vortex-array/src/arrays/arbitrary.rs index 33160d106be..6742eb4ff74 100644 --- a/vortex-array/src/arrays/arbitrary.rs +++ b/vortex-array/src/arrays/arbitrary.rs @@ -13,8 +13,8 @@ use vortex_error::VortexExpect; use crate::ArrayRef; use crate::IntoArray; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::arrays::BoolArray; use crate::arrays::ChunkedArray; use crate::arrays::NullArray; diff --git a/vortex-array/src/arrays/bool/compute/fill_null.rs b/vortex-array/src/arrays/bool/compute/fill_null.rs index 8ebbbb9c018..e909a100ced 100644 --- a/vortex-array/src/arrays/bool/compute/fill_null.rs +++ b/vortex-array/src/arrays/bool/compute/fill_null.rs @@ -42,8 +42,9 @@ impl FillNullKernel for Bool { } #[cfg(test)] -#[allow(deprecated)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_buffer::BitBuffer; use vortex_buffer::bitbuffer; @@ -52,7 +53,7 @@ mod tests { use crate::arrays::BoolArray; use crate::arrays::bool::BoolArrayExt; use crate::builtins::ArrayBuiltins; - use crate::canonical::ToCanonical; + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::scalar::Scalar; diff --git a/vortex-array/src/arrays/bool/compute/take.rs b/vortex-array/src/arrays/bool/compute/take.rs index 598aaf557ec..4406c50a94a 100644 --- a/vortex-array/src/arrays/bool/compute/take.rs +++ b/vortex-array/src/arrays/bool/compute/take.rs @@ -84,8 +84,8 @@ mod test { use vortex_buffer::buffer; use crate::IntoArray as _; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::BoolArray; use crate::arrays::PrimitiveArray; use crate::arrays::bool::BoolArrayExt; diff --git a/vortex-array/src/arrays/bool/vtable/operations.rs b/vortex-array/src/arrays/bool/vtable/operations.rs index 0736a58c2ca..2a136880c33 100644 --- a/vortex-array/src/arrays/bool/vtable/operations.rs +++ b/vortex-array/src/arrays/bool/vtable/operations.rs @@ -28,8 +28,8 @@ mod tests { use std::iter; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::BoolArray; use crate::arrays::bool::BoolArrayExt; use crate::assert_arrays_eq; diff --git a/vortex-array/src/arrays/chunked/compute/take.rs b/vortex-array/src/arrays/chunked/compute/take.rs index e674ac775fa..06df02383f9 100644 --- a/vortex-array/src/arrays/chunked/compute/take.rs +++ b/vortex-array/src/arrays/chunked/compute/take.rs @@ -126,8 +126,8 @@ mod test { use vortex_error::VortexResult; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::BoolArray; use crate::arrays::ChunkedArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/chunked/compute/zip.rs b/vortex-array/src/arrays/chunked/compute/zip.rs index 5fcf7150420..c3ce79cc479 100644 --- a/vortex-array/src/arrays/chunked/compute/zip.rs +++ b/vortex-array/src/arrays/chunked/compute/zip.rs @@ -52,8 +52,8 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::Chunked; use crate::arrays::ChunkedArray; diff --git a/vortex-array/src/arrays/chunked/paired_chunks.rs b/vortex-array/src/arrays/chunked/paired_chunks.rs index 1fd2e9183bb..9287735d76a 100644 --- a/vortex-array/src/arrays/chunked/paired_chunks.rs +++ b/vortex-array/src/arrays/chunked/paired_chunks.rs @@ -121,6 +121,8 @@ mod tests { use vortex_error::VortexResult; use crate::IntoArray; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::ChunkedArray; use crate::arrays::chunked::paired_chunks::PairedChunksExt; use crate::dtype::DType; @@ -137,8 +139,6 @@ mod tests { left: &ChunkedArray, right: &ChunkedArray, ) -> VortexResult, Vec, std::ops::Range)>> { - #[allow(deprecated)] - use crate::ToCanonical; let mut result = Vec::new(); for pair in left.paired_chunks(right) { let pair = pair?; diff --git a/vortex-array/src/arrays/chunked/tests.rs b/vortex-array/src/arrays/chunked/tests.rs index ef68a7a6147..f452d0c1758 100644 --- a/vortex-array/src/arrays/chunked/tests.rs +++ b/vortex-array/src/arrays/chunked/tests.rs @@ -19,8 +19,8 @@ use crate::arrays::VarBinViewArray; use crate::arrays::chunked::ChunkedArrayExt; use crate::arrays::struct_::StructArrayExt; use crate::assert_arrays_eq; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::dtype::PType; diff --git a/vortex-array/src/arrays/chunked/vtable/canonical.rs b/vortex-array/src/arrays/chunked/vtable/canonical.rs index da01df71ade..2e14b00bb0d 100644 --- a/vortex-array/src/arrays/chunked/vtable/canonical.rs +++ b/vortex-array/src/arrays/chunked/vtable/canonical.rs @@ -220,8 +220,8 @@ mod tests { use crate::ExecutionCtx; use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::accessor::ArrayAccessor; use crate::arrays::ChunkedArray; diff --git a/vortex-array/src/arrays/chunked/vtable/mod.rs b/vortex-array/src/arrays/chunked/vtable/mod.rs index a035f9ac651..3ee71433a12 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -21,8 +21,8 @@ use crate::ExecutionCtx; use crate::ExecutionResult; use crate::IntoArray; use crate::Precision; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::array::Array; use crate::array::ArrayId; use crate::array::ArrayParts; diff --git a/vortex-array/src/arrays/constant/compute/take.rs b/vortex-array/src/arrays/constant/compute/take.rs index 1add231b688..8fc8976599b 100644 --- a/vortex-array/src/arrays/constant/compute/take.rs +++ b/vortex-array/src/arrays/constant/compute/take.rs @@ -72,8 +72,8 @@ mod tests { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/constant/vtable/canonical.rs b/vortex-array/src/arrays/constant/vtable/canonical.rs index 5f4bcc5cef4..b53858c71e3 100644 --- a/vortex-array/src/arrays/constant/vtable/canonical.rs +++ b/vortex-array/src/arrays/constant/vtable/canonical.rs @@ -333,8 +333,8 @@ mod tests { use crate::arrays::listview::ListViewRebuildMode; use crate::arrays::struct_::StructArrayExt; use crate::assert_arrays_eq; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::dtype::PType; diff --git a/vortex-array/src/arrays/datetime/test.rs b/vortex-array/src/arrays/datetime/test.rs index 23455dc4f55..6919afc6c0f 100644 --- a/vortex-array/src/arrays/datetime/test.rs +++ b/vortex-array/src/arrays/datetime/test.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributorsuse crate::dtype::Nullability; -#![allow(deprecated)] +#![expect(deprecated)] use rstest::rstest; use vortex_buffer::buffer; @@ -9,7 +9,7 @@ use vortex_error::VortexResult; use crate::IntoArray; use crate::Precision; -use crate::ToCanonical; +use crate::ToCanonical as _; use crate::arrays::PrimitiveArray; use crate::arrays::datetime::TemporalData; use crate::assert_arrays_eq; diff --git a/vortex-array/src/arrays/decimal/compute/cast.rs b/vortex-array/src/arrays/decimal/compute/cast.rs index 1f1dd9bd65a..a505ff12b7e 100644 --- a/vortex-array/src/arrays/decimal/compute/cast.rs +++ b/vortex-array/src/arrays/decimal/compute/cast.rs @@ -150,8 +150,8 @@ mod tests { use crate::VortexSessionExecute; use crate::arrays::DecimalArray; use crate::builtins::ArrayBuiltins; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::compute::conformance::cast::test_cast_conformance; use crate::dtype::DType; use crate::dtype::DecimalDType; diff --git a/vortex-array/src/arrays/decimal/compute/fill_null.rs b/vortex-array/src/arrays/decimal/compute/fill_null.rs index a71e3861f1b..e5dedf7d3bd 100644 --- a/vortex-array/src/arrays/decimal/compute/fill_null.rs +++ b/vortex-array/src/arrays/decimal/compute/fill_null.rs @@ -94,8 +94,8 @@ mod tests { use crate::arrays::DecimalArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DecimalDType; use crate::dtype::Nullability; use crate::scalar::DecimalValue; diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index fa137a5758c..e2a91ac187c 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -13,8 +13,8 @@ use vortex_mask::AllOr; use crate::ArrayRef; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::array::Array; use crate::array::ArrayParts; @@ -272,8 +272,8 @@ mod test { use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ChunkedArray; use crate::arrays::DictArray; diff --git a/vortex-array/src/arrays/dict/compute/cast.rs b/vortex-array/src/arrays/dict/compute/cast.rs index 78455338afe..065db89534f 100644 --- a/vortex-array/src/arrays/dict/compute/cast.rs +++ b/vortex-array/src/arrays/dict/compute/cast.rs @@ -57,8 +57,8 @@ mod tests { use vortex_buffer::buffer; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::Dict; use crate::arrays::PrimitiveArray; use crate::arrays::dict::DictArraySlotsExt; diff --git a/vortex-array/src/arrays/dict/compute/fill_null.rs b/vortex-array/src/arrays/dict/compute/fill_null.rs index 9107d9f2f98..911cb3eded5 100644 --- a/vortex-array/src/arrays/dict/compute/fill_null.rs +++ b/vortex-array/src/arrays/dict/compute/fill_null.rs @@ -95,8 +95,8 @@ mod tests { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::DictArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/dict/compute/mod.rs b/vortex-array/src/arrays/dict/compute/mod.rs index c5f854a2ad5..2af3bf2e14d 100644 --- a/vortex-array/src/arrays/dict/compute/mod.rs +++ b/vortex-array/src/arrays/dict/compute/mod.rs @@ -60,8 +60,8 @@ mod test { use crate::ArrayRef; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::accessor::ArrayAccessor; use crate::arrays::ConstantArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/extension/compute/rules.rs b/vortex-array/src/arrays/extension/compute/rules.rs index 78079bc32ae..c4e8a8aea72 100644 --- a/vortex-array/src/arrays/extension/compute/rules.rs +++ b/vortex-array/src/arrays/extension/compute/rules.rs @@ -56,8 +56,8 @@ mod tests { use vortex_mask::Mask; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::ConstantArray; use crate::arrays::Extension; use crate::arrays::ExtensionArray; diff --git a/vortex-array/src/arrays/filter/execute/bool.rs b/vortex-array/src/arrays/filter/execute/bool.rs index 2046806cc4a..0b9441f52ae 100644 --- a/vortex-array/src/arrays/filter/execute/bool.rs +++ b/vortex-array/src/arrays/filter/execute/bool.rs @@ -31,8 +31,8 @@ mod test { use crate::IntoArray; use crate::arrays::filter::execute::bool::BoolArray; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::compute::conformance::filter::test_filter_conformance; #[expect(deprecated)] diff --git a/vortex-array/src/arrays/filter/execute/listview.rs b/vortex-array/src/arrays/filter/execute/listview.rs index e2a5c1c7013..49a54aac882 100644 --- a/vortex-array/src/arrays/filter/execute/listview.rs +++ b/vortex-array/src/arrays/filter/execute/listview.rs @@ -86,8 +86,8 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ListViewArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/filter/execute/primitive.rs b/vortex-array/src/arrays/filter/execute/primitive.rs index bc86439f01b..4e2a3ee863a 100644 --- a/vortex-array/src/arrays/filter/execute/primitive.rs +++ b/vortex-array/src/arrays/filter/execute/primitive.rs @@ -35,8 +35,8 @@ mod test { use crate::IntoArray; use crate::arrays::PrimitiveArray; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::compute::conformance::filter::LARGE_SIZE; use crate::compute::conformance::filter::MEDIUM_SIZE; use crate::compute::conformance::filter::test_filter_conformance; diff --git a/vortex-array/src/arrays/fixed_size_list/tests/nested.rs b/vortex-array/src/arrays/fixed_size_list/tests/nested.rs index fa642f193f1..686fc3f7be9 100644 --- a/vortex-array/src/arrays/fixed_size_list/tests/nested.rs +++ b/vortex-array/src/arrays/fixed_size_list/tests/nested.rs @@ -7,8 +7,8 @@ use vortex_buffer::buffer; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::FixedSizeListArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/list/compute/take.rs b/vortex-array/src/arrays/list/compute/take.rs index dfb7872fe4e..a7573a68558 100644 --- a/vortex-array/src/arrays/list/compute/take.rs +++ b/vortex-array/src/arrays/list/compute/take.rs @@ -200,8 +200,8 @@ mod test { use crate::IntoArray as _; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::BoolArray; use crate::arrays::ListArray; diff --git a/vortex-array/src/arrays/listview/array.rs b/vortex-array/src/arrays/listview/array.rs index 761d8d713d1..0e9104794c6 100644 --- a/vortex-array/src/arrays/listview/array.rs +++ b/vortex-array/src/arrays/listview/array.rs @@ -14,8 +14,8 @@ use vortex_error::vortex_err; use crate::ArrayRef; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::array::Array; use crate::array::ArrayParts; diff --git a/vortex-array/src/arrays/listview/conversion.rs b/vortex-array/src/arrays/listview/conversion.rs index 9467a068402..cd4c89b0697 100644 --- a/vortex-array/src/arrays/listview/conversion.rs +++ b/vortex-array/src/arrays/listview/conversion.rs @@ -8,8 +8,8 @@ use crate::ArrayRef; use crate::Canonical; use crate::ExecutionCtx; use crate::IntoArray; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::arrays::ExtensionArray; use crate::arrays::FixedSizeListArray; use crate::arrays::ListArray; diff --git a/vortex-array/src/arrays/listview/rebuild.rs b/vortex-array/src/arrays/listview/rebuild.rs index ad3f4083805..e5e1910c424 100644 --- a/vortex-array/src/arrays/listview/rebuild.rs +++ b/vortex-array/src/arrays/listview/rebuild.rs @@ -8,8 +8,8 @@ use vortex_error::VortexResult; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::aggregate_fn::fns::min_max::min_max; use crate::arrays::ConstantArray; @@ -383,8 +383,8 @@ mod tests { use super::ListViewRebuildMode; use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ListViewArray; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/listview/tests/filter.rs b/vortex-array/src/arrays/listview/tests/filter.rs index fe09b1c81ae..ff20a410249 100644 --- a/vortex-array/src/arrays/listview/tests/filter.rs +++ b/vortex-array/src/arrays/listview/tests/filter.rs @@ -12,8 +12,8 @@ use super::common::create_nullable_listview; use super::common::create_overlapping_listview; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; use crate::arrays::ListViewArray; diff --git a/vortex-array/src/arrays/listview/tests/operations.rs b/vortex-array/src/arrays/listview/tests/operations.rs index 3de16abb1fa..9fdc25dc77f 100644 --- a/vortex-array/src/arrays/listview/tests/operations.rs +++ b/vortex-array/src/arrays/listview/tests/operations.rs @@ -1,7 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors - -#![allow(deprecated)] +#![expect(deprecated)] use std::sync::Arc; @@ -14,7 +13,7 @@ use super::common::create_large_listview; use super::common::create_nullable_listview; use crate::IntoArray; use crate::LEGACY_SESSION; -use crate::ToCanonical; +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::aggregate_fn::fns::is_constant::is_constant; use crate::arrays::BoolArray; @@ -218,7 +217,6 @@ fn test_slice_edge_cases( #[case::i32_to_i64(PType::I32, PType::I64)] #[case::f32_to_f64(PType::F32, PType::F64)] #[case::u8_to_u16(PType::U8, PType::U16)] -#[allow(deprecated)] fn test_cast_numeric_types(#[case] from_ptype: PType, #[case] to_ptype: PType) { let elements = match from_ptype { PType::I32 => buffer![1i32, 2, 3, 4, 5, 6].into_array(), @@ -306,7 +304,6 @@ fn test_cast_with_nulls() { #[rstest] #[case::empty_lists(vec![0, 1, 0, 1], 4)] #[case::overlapping(vec![3, 3, 5], 3)] -#[allow(deprecated)] fn test_cast_special_patterns(#[case] expected_sizes: Vec, #[case] list_count: usize) { let is_empty_case = list_count == 4; diff --git a/vortex-array/src/arrays/listview/tests/take.rs b/vortex-array/src/arrays/listview/tests/take.rs index 3caeba77d25..6f46d080689 100644 --- a/vortex-array/src/arrays/listview/tests/take.rs +++ b/vortex-array/src/arrays/listview/tests/take.rs @@ -11,8 +11,8 @@ use super::common::create_nullable_listview; use super::common::create_overlapping_listview; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; use crate::arrays::ListViewArray; diff --git a/vortex-array/src/arrays/masked/tests.rs b/vortex-array/src/arrays/masked/tests.rs index 022b61723d9..545c62ce612 100644 --- a/vortex-array/src/arrays/masked/tests.rs +++ b/vortex-array/src/arrays/masked/tests.rs @@ -9,7 +9,7 @@ use super::*; use crate::Canonical; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] +#[expect(deprecated)] use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::PrimitiveArray; diff --git a/vortex-array/src/arrays/null/compute/mod.rs b/vortex-array/src/arrays/null/compute/mod.rs index d2492fa394c..4e539df1c58 100644 --- a/vortex-array/src/arrays/null/compute/mod.rs +++ b/vortex-array/src/arrays/null/compute/mod.rs @@ -16,8 +16,8 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::NullArray; use crate::compute::conformance::consistency::test_array_consistency; diff --git a/vortex-array/src/arrays/null/compute/take.rs b/vortex-array/src/arrays/null/compute/take.rs index d84e22b4350..6ab459b3aa9 100644 --- a/vortex-array/src/arrays/null/compute/take.rs +++ b/vortex-array/src/arrays/null/compute/take.rs @@ -6,8 +6,8 @@ use vortex_error::vortex_bail; use crate::ArrayRef; use crate::IntoArray; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::array::ArrayView; use crate::arrays::Null; use crate::arrays::NullArray; diff --git a/vortex-array/src/arrays/primitive/array/accessor.rs b/vortex-array/src/arrays/primitive/array/accessor.rs index c59380d2895..887cb5a02e2 100644 --- a/vortex-array/src/arrays/primitive/array/accessor.rs +++ b/vortex-array/src/arrays/primitive/array/accessor.rs @@ -5,8 +5,8 @@ use std::iter; use vortex_error::VortexExpect; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::accessor::ArrayAccessor; use crate::arrays::PrimitiveArray; use crate::dtype::NativePType; diff --git a/vortex-array/src/arrays/primitive/array/mod.rs b/vortex-array/src/arrays/primitive/array/mod.rs index 2a4876d2ced..ad6075bf495 100644 --- a/vortex-array/src/arrays/primitive/array/mod.rs +++ b/vortex-array/src/arrays/primitive/array/mod.rs @@ -16,8 +16,8 @@ use vortex_error::vortex_err; use vortex_error::vortex_panic; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::array::Array; use crate::array::ArrayParts; diff --git a/vortex-array/src/arrays/primitive/array/patch.rs b/vortex-array/src/arrays/primitive/array/patch.rs index 8adee6a2c3f..60ea37f59bb 100644 --- a/vortex-array/src/arrays/primitive/array/patch.rs +++ b/vortex-array/src/arrays/primitive/array/patch.rs @@ -135,8 +135,8 @@ mod tests { use vortex_buffer::buffer; use super::*; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::assert_arrays_eq; use crate::validity::Validity; diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index 3c035920813..8551791c8ac 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -121,8 +121,8 @@ mod test { use crate::arrays::PrimitiveArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::compute::conformance::cast::test_cast_conformance; use crate::dtype::DType; use crate::dtype::Nullability; diff --git a/vortex-array/src/arrays/primitive/compute/fill_null.rs b/vortex-array/src/arrays/primitive/compute/fill_null.rs index a377a2fb5bf..09b3fa1d57a 100644 --- a/vortex-array/src/arrays/primitive/compute/fill_null.rs +++ b/vortex-array/src/arrays/primitive/compute/fill_null.rs @@ -57,8 +57,8 @@ mod test { use crate::arrays::primitive::compute::fill_null::BoolArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::scalar::Scalar; use crate::validity::Validity; diff --git a/vortex-array/src/arrays/struct_/compute/cast.rs b/vortex-array/src/arrays/struct_/compute/cast.rs index e0f4aead1a1..fe748d21200 100644 --- a/vortex-array/src/arrays/struct_/compute/cast.rs +++ b/vortex-array/src/arrays/struct_/compute/cast.rs @@ -91,8 +91,8 @@ mod tests { use vortex_buffer::buffer; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::PrimitiveArray; use crate::arrays::StructArray; use crate::arrays::VarBinArray; diff --git a/vortex-array/src/arrays/struct_/compute/rules.rs b/vortex-array/src/arrays/struct_/compute/rules.rs index 33f27829b75..881c9661c2c 100644 --- a/vortex-array/src/arrays/struct_/compute/rules.rs +++ b/vortex-array/src/arrays/struct_/compute/rules.rs @@ -153,8 +153,8 @@ mod tests { use crate::arrays::struct_::compute::rules::ConstantArray; use crate::assert_arrays_eq; use crate::builtins::ArrayBuiltins; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::FieldNames; use crate::dtype::Nullability; diff --git a/vortex-array/src/arrays/varbin/accessor.rs b/vortex-array/src/arrays/varbin/accessor.rs index d093faa5d71..a68ee3fdea1 100644 --- a/vortex-array/src/arrays/varbin/accessor.rs +++ b/vortex-array/src/arrays/varbin/accessor.rs @@ -5,8 +5,8 @@ use std::iter; use vortex_error::VortexExpect; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinArray; use crate::arrays::varbin::VarBinArrayExt; diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index cf341f879ef..a92f096d8ca 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -13,8 +13,8 @@ use vortex_error::vortex_err; use crate::ArrayRef; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::array::Array; use crate::array::ArrayParts; diff --git a/vortex-array/src/arrays/varbin/compute/compare.rs b/vortex-array/src/arrays/varbin/compute/compare.rs index 5f74a4ac562..e6b19b2c046 100644 --- a/vortex-array/src/arrays/varbin/compute/compare.rs +++ b/vortex-array/src/arrays/varbin/compute/compare.rs @@ -146,8 +146,8 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; use crate::arrays::VarBinArray; diff --git a/vortex-array/src/arrays/varbin/vtable/canonical.rs b/vortex-array/src/arrays/varbin/vtable/canonical.rs index ffe56eb504e..1c9369b51df 100644 --- a/vortex-array/src/arrays/varbin/vtable/canonical.rs +++ b/vortex-array/src/arrays/varbin/vtable/canonical.rs @@ -44,8 +44,9 @@ pub(crate) fn varbin_to_canonical( } #[cfg(test)] -#[allow(deprecated)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use crate::LEGACY_SESSION; @@ -54,7 +55,7 @@ mod tests { use crate::arrays::VarBinViewArray; use crate::arrays::varbin::builder::VarBinBuilder; use crate::assert_arrays_eq; - use crate::canonical::ToCanonical; + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; diff --git a/vortex-array/src/arrays/varbinview/accessor.rs b/vortex-array/src/arrays/varbinview/accessor.rs index faf25350859..72cc910ee6b 100644 --- a/vortex-array/src/arrays/varbinview/accessor.rs +++ b/vortex-array/src/arrays/varbinview/accessor.rs @@ -5,8 +5,8 @@ use std::iter; use vortex_error::VortexExpect; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::validity::Validity; diff --git a/vortex-array/src/arrays/varbinview/compute/mod.rs b/vortex-array/src/arrays/varbinview/compute/mod.rs index 99bf4843fff..7673c88b8e7 100644 --- a/vortex-array/src/arrays/varbinview/compute/mod.rs +++ b/vortex-array/src/arrays/varbinview/compute/mod.rs @@ -15,8 +15,8 @@ mod tests { use crate::IntoArray; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; #[test] #[expect(deprecated)] fn take_nullable() { diff --git a/vortex-array/src/arrays/varbinview/compute/take.rs b/vortex-array/src/arrays/varbinview/compute/take.rs index 38f65ff55b5..f1bdb7c433d 100644 --- a/vortex-array/src/arrays/varbinview/compute/take.rs +++ b/vortex-array/src/arrays/varbinview/compute/take.rs @@ -95,8 +95,8 @@ mod tests { use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::compute::take::PrimitiveArray; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::compute::conformance::take::test_take_conformance; use crate::dtype::DType; use crate::dtype::Nullability::NonNullable; diff --git a/vortex-array/src/arrays/varbinview/compute/zip.rs b/vortex-array/src/arrays/varbinview/compute/zip.rs index 0ed1563a3d1..12dea3d31a9 100644 --- a/vortex-array/src/arrays/varbinview/compute/zip.rs +++ b/vortex-array/src/arrays/varbinview/compute/zip.rs @@ -214,8 +214,8 @@ mod tests { use crate::accessor::ArrayAccessor; use crate::arrays::VarBinViewArray; use crate::builtins::ArrayBuiltins; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; diff --git a/vortex-array/src/arrays/varbinview/tests.rs b/vortex-array/src/arrays/varbinview/tests.rs index 8937844ef93..b9cdfd11bb4 100644 --- a/vortex-array/src/arrays/varbinview/tests.rs +++ b/vortex-array/src/arrays/varbinview/tests.rs @@ -1,8 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::BinaryView; use crate::assert_arrays_eq; diff --git a/vortex-array/src/builders/bool.rs b/vortex-array/src/builders/bool.rs index 0a65b91541f..ad45f6a12d2 100644 --- a/vortex-array/src/builders/bool.rs +++ b/vortex-array/src/builders/bool.rs @@ -20,8 +20,8 @@ use crate::builders::ArrayBuilder; use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::canonical::Canonical; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::scalar::Scalar; @@ -170,8 +170,8 @@ mod tests { use crate::builders::BoolBuilder; use crate::builders::bool::BoolArray; use crate::builders::builder_with_capacity; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::scalar::Scalar; diff --git a/vortex-array/src/builders/decimal.rs b/vortex-array/src/builders/decimal.rs index 1419babc620..6d619b7e5cb 100644 --- a/vortex-array/src/builders/decimal.rs +++ b/vortex-array/src/builders/decimal.rs @@ -14,8 +14,8 @@ use vortex_mask::Mask; use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::DecimalArray; use crate::builders::ArrayBuilder; diff --git a/vortex-array/src/builders/dict/bytes.rs b/vortex-array/src/builders/dict/bytes.rs index 97151c68168..ff15bfcc69f 100644 --- a/vortex-array/src/builders/dict/bytes.rs +++ b/vortex-array/src/builders/dict/bytes.rs @@ -25,8 +25,8 @@ use crate::arrays::VarBin; use crate::arrays::VarBinView; use crate::arrays::VarBinViewArray; use crate::arrays::varbinview::build_views::BinaryView; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::PType; use crate::dtype::UnsignedPType; @@ -207,8 +207,8 @@ mod test { use std::str; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::accessor::ArrayAccessor; use crate::arrays::VarBinArray; use crate::arrays::dict::DictArraySlotsExt; diff --git a/vortex-array/src/builders/dict/mod.rs b/vortex-array/src/builders/dict/mod.rs index 66fc2958952..fe8176afb70 100644 --- a/vortex-array/src/builders/dict/mod.rs +++ b/vortex-array/src/builders/dict/mod.rs @@ -9,8 +9,8 @@ use vortex_error::vortex_panic; use crate::ArrayRef; use crate::IntoArray; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::arrays::DictArray; use crate::arrays::Primitive; use crate::arrays::VarBin; diff --git a/vortex-array/src/builders/dict/primitive.rs b/vortex-array/src/builders/dict/primitive.rs index 0476846cd59..566ecbdd901 100644 --- a/vortex-array/src/builders/dict/primitive.rs +++ b/vortex-array/src/builders/dict/primitive.rs @@ -15,8 +15,8 @@ use super::DictConstraints; use super::DictEncoder; use crate::ArrayRef; use crate::IntoArray; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::accessor::ArrayAccessor; use crate::arrays::PrimitiveArray; use crate::arrays::primitive::NativeValue; diff --git a/vortex-array/src/builders/extension.rs b/vortex-array/src/builders/extension.rs index 1aa866ac0fc..72b56b6040f 100644 --- a/vortex-array/src/builders/extension.rs +++ b/vortex-array/src/builders/extension.rs @@ -15,8 +15,8 @@ use crate::builders::ArrayBuilder; use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::builder_with_capacity; use crate::canonical::Canonical; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::extension::ExtDTypeRef; use crate::scalar::ExtScalar; diff --git a/vortex-array/src/builders/fixed_size_list.rs b/vortex-array/src/builders/fixed_size_list.rs index e37f15a0cd0..db7e4b416c1 100644 --- a/vortex-array/src/builders/fixed_size_list.rs +++ b/vortex-array/src/builders/fixed_size_list.rs @@ -22,8 +22,8 @@ use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::builders::builder_with_capacity; use crate::canonical::Canonical; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::scalar::ListScalar; @@ -284,8 +284,8 @@ mod tests { use super::FixedSizeListBuilder; use crate::IntoArray as _; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::PrimitiveArray; use crate::arrays::fixed_size_list::FixedSizeListArrayExt; diff --git a/vortex-array/src/builders/list.rs b/vortex-array/src/builders/list.rs index d75f7f1ac0f..7f91248cc97 100644 --- a/vortex-array/src/builders/list.rs +++ b/vortex-array/src/builders/list.rs @@ -23,8 +23,8 @@ use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::builders::PrimitiveBuilder; use crate::builders::builder_with_capacity; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::IntegerPType; use crate::dtype::Nullability; @@ -323,8 +323,8 @@ mod tests { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::ChunkedArray; use crate::arrays::PrimitiveArray; use crate::arrays::list::ListArrayExt; diff --git a/vortex-array/src/builders/listview.rs b/vortex-array/src/builders/listview.rs index b738e1e8ea4..fe470f0a0ab 100644 --- a/vortex-array/src/builders/listview.rs +++ b/vortex-array/src/builders/listview.rs @@ -21,8 +21,8 @@ use vortex_mask::Mask; use crate::ArrayRef; use crate::Canonical; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::array::IntoArray; use crate::arrays::ListViewArray; diff --git a/vortex-array/src/builders/primitive.rs b/vortex-array/src/builders/primitive.rs index 9df78d28032..438bd9262f3 100644 --- a/vortex-array/src/builders/primitive.rs +++ b/vortex-array/src/builders/primitive.rs @@ -19,8 +19,8 @@ use crate::builders::ArrayBuilder; use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::canonical::Canonical; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::NativePType; use crate::dtype::Nullability; diff --git a/vortex-array/src/builders/struct_.rs b/vortex-array/src/builders/struct_.rs index ef60acbcab3..a05eac2facb 100644 --- a/vortex-array/src/builders/struct_.rs +++ b/vortex-array/src/builders/struct_.rs @@ -22,8 +22,8 @@ use crate::builders::DEFAULT_BUILDER_CAPACITY; use crate::builders::LazyBitBufferBuilder; use crate::builders::builder_with_capacity; use crate::canonical::Canonical; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; use crate::dtype::StructFields; diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index 081e064787f..1dbbecc4609 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -28,8 +28,8 @@ use crate::arrays::varbinview::compact::BufferUtilization; use crate::builders::ArrayBuilder; use crate::builders::LazyBitBufferBuilder; use crate::canonical::Canonical; -#[allow(deprecated)] -use crate::canonical::ToCanonical; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::scalar::Scalar; diff --git a/vortex-array/src/canonical.rs b/vortex-array/src/canonical.rs index 4badaa13dc2..84c03dcfaaa 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -470,56 +470,65 @@ pub trait ToCanonical { } // Blanket impl for all Array encodings. -#[allow(deprecated)] +#[expect(deprecated)] impl ToCanonical for ArrayRef { + #[expect(deprecated)] fn to_null(&self) -> NullArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_null() } + #[expect(deprecated)] fn to_bool(&self) -> BoolArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_bool() } + #[expect(deprecated)] fn to_primitive(&self) -> PrimitiveArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_primitive() } + #[expect(deprecated)] fn to_decimal(&self) -> DecimalArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_decimal() } + #[expect(deprecated)] fn to_struct(&self) -> StructArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_struct() } + #[expect(deprecated)] fn to_listview(&self) -> ListViewArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_listview() } + #[expect(deprecated)] fn to_fixed_size_list(&self) -> FixedSizeListArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_fixed_size_list() } + #[expect(deprecated)] fn to_varbinview(&self) -> VarBinViewArray { self.to_canonical() .vortex_expect("to_canonical failed") .into_varbinview() } + #[expect(deprecated)] fn to_extension(&self) -> ExtensionArray { self.to_canonical() .vortex_expect("to_canonical failed") diff --git a/vortex-array/src/compute/conformance/binary_numeric.rs b/vortex-array/src/compute/conformance/binary_numeric.rs index b4240fb2db2..3d423c78bd0 100644 --- a/vortex-array/src/compute/conformance/binary_numeric.rs +++ b/vortex-array/src/compute/conformance/binary_numeric.rs @@ -31,8 +31,8 @@ use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; use crate::RecursiveCanonical; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::ConstantArray; use crate::builtins::ArrayBuiltins; diff --git a/vortex-array/src/display/mod.rs b/vortex-array/src/display/mod.rs index f0d9e64d61c..30b441da819 100644 --- a/vortex-array/src/display/mod.rs +++ b/vortex-array/src/display/mod.rs @@ -21,6 +21,8 @@ pub use tree_display::TreeDisplay; use crate::ArrayRef; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; +#[expect(deprecated)] +use crate::canonical::ToCanonical as _; /// Describe how to convert an array to a string. /// @@ -580,8 +582,6 @@ impl ArrayRef { } #[cfg(feature = "table-display")] DisplayOptions::TableDisplay => { - #[allow(deprecated)] - use crate::canonical::ToCanonical; use crate::dtype::DType; let mut builder = tabled::builder::Builder::default(); diff --git a/vortex-array/src/patches.rs b/vortex-array/src/patches.rs index bcd1a3821d9..0fba35ef808 100644 --- a/vortex-array/src/patches.rs +++ b/vortex-array/src/patches.rs @@ -22,8 +22,8 @@ use crate::ArrayRef; use crate::ExecutionCtx; use crate::IntoArray; use crate::LEGACY_SESSION; -#[allow(deprecated)] -use crate::ToCanonical; +#[expect(deprecated)] +use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::PrimitiveArray; use crate::builtins::ArrayBuiltins; @@ -1117,8 +1117,8 @@ mod test { use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::assert_arrays_eq; use crate::patches::Patches; diff --git a/vortex-array/src/scalar_fn/fns/between/mod.rs b/vortex-array/src/scalar_fn/fns/between/mod.rs index ce365054a39..d9f6796f309 100644 --- a/vortex-array/src/scalar_fn/fns/between/mod.rs +++ b/vortex-array/src/scalar_fn/fns/between/mod.rs @@ -324,7 +324,7 @@ impl ScalarFnVTable for Between { #[cfg(test)] mod tests { - #![allow(deprecated)] + #![expect(deprecated)] use rstest::rstest; use vortex_buffer::buffer; @@ -332,7 +332,7 @@ mod tests { use super::*; use crate::IntoArray; use crate::LEGACY_SESSION; - use crate::ToCanonical; + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::BoolArray; use crate::arrays::DecimalArray; diff --git a/vortex-array/src/scalar_fn/fns/binary/boolean.rs b/vortex-array/src/scalar_fn/fns/binary/boolean.rs index b8b43c52855..a752d619edd 100644 --- a/vortex-array/src/scalar_fn/fns/binary/boolean.rs +++ b/vortex-array/src/scalar_fn/fns/binary/boolean.rs @@ -102,7 +102,7 @@ fn constant_boolean( #[cfg(test)] mod tests { - #![allow(deprecated)] + #![expect(deprecated)] use rstest::rstest; @@ -112,7 +112,7 @@ mod tests { use crate::VortexSessionExecute; use crate::arrays::BoolArray; use crate::builtins::ArrayBuiltins; - use crate::canonical::ToCanonical; + use crate::canonical::ToCanonical as _; use crate::scalar_fn::fns::operators::Operator; #[rstest] diff --git a/vortex-array/src/scalar_fn/fns/binary/compare.rs b/vortex-array/src/scalar_fn/fns/binary/compare.rs index b064ad053dc..b0127ddb65a 100644 --- a/vortex-array/src/scalar_fn/fns/binary/compare.rs +++ b/vortex-array/src/scalar_fn/fns/binary/compare.rs @@ -250,8 +250,8 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; use crate::LEGACY_SESSION; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::BoolArray; use crate::arrays::ListArray; diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index 416257dd2d3..88a52ed7c9d 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -461,8 +461,8 @@ mod tests { use crate::arrays::ListArray; use crate::arrays::VarBinArray; use crate::assert_arrays_eq; - #[allow(deprecated)] - use crate::canonical::ToCanonical; + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Field; use crate::dtype::FieldPath; diff --git a/vortex-array/src/scalar_fn/fns/merge.rs b/vortex-array/src/scalar_fn/fns/merge.rs index dc89e07022d..5693da5485f 100644 --- a/vortex-array/src/scalar_fn/fns/merge.rs +++ b/vortex-array/src/scalar_fn/fns/merge.rs @@ -291,8 +291,8 @@ mod tests { use crate::ArrayRef; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::PrimitiveArray; use crate::arrays::struct_::StructArrayExt; use crate::assert_arrays_eq; diff --git a/vortex-array/src/scalar_fn/fns/not/mod.rs b/vortex-array/src/scalar_fn/fns/not/mod.rs index 73cd0ecb270..73c5dee80ea 100644 --- a/vortex-array/src/scalar_fn/fns/not/mod.rs +++ b/vortex-array/src/scalar_fn/fns/not/mod.rs @@ -122,8 +122,8 @@ impl ScalarFnVTable for Not { #[cfg(test)] mod tests { use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::bool::BoolArrayExt; use crate::dtype::DType; use crate::dtype::Nullability; diff --git a/vortex-array/src/scalar_fn/fns/pack.rs b/vortex-array/src/scalar_fn/fns/pack.rs index f76696fdf35..c7660a8a422 100644 --- a/vortex-array/src/scalar_fn/fns/pack.rs +++ b/vortex-array/src/scalar_fn/fns/pack.rs @@ -168,8 +168,8 @@ mod tests { use super::PackOptions; use crate::ArrayRef; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::PrimitiveArray; use crate::arrays::struct_::StructArrayExt; use crate::assert_arrays_eq; diff --git a/vortex-array/src/scalar_fn/fns/select.rs b/vortex-array/src/scalar_fn/fns/select.rs index 602c8f3866b..6c1be3c86ea 100644 --- a/vortex-array/src/scalar_fn/fns/select.rs +++ b/vortex-array/src/scalar_fn/fns/select.rs @@ -307,8 +307,8 @@ mod tests { use vortex_buffer::buffer; use crate::IntoArray; - #[allow(deprecated)] - use crate::ToCanonical; + #[expect(deprecated)] + use crate::ToCanonical as _; use crate::arrays::struct_::StructArrayExt; use crate::dtype::DType; use crate::dtype::FieldName; From 22300885ee0c96cb0cd316c7eb0ebbb4fc6b5570 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 13:29:24 -0400 Subject: [PATCH 3/8] deprecate all decompression methods without a context Signed-off-by: Joe Isaacs --- encodings/alp/src/alp/array.rs | 2 + encodings/alp/src/alp/compress.rs | 2 + encodings/alp/src/alp/compute/cast.rs | 2 + encodings/alp/src/alp/compute/compare.rs | 2 + encodings/alp/src/alp/compute/filter.rs | 2 + encodings/alp/src/alp/compute/mask.rs | 2 + encodings/alp/src/alp/compute/take.rs | 2 + encodings/alp/src/alp_rd/array.rs | 6 +- encodings/alp/src/alp_rd/compute/cast.rs | 2 + encodings/alp/src/alp_rd/compute/take.rs | 2 + encodings/datetime-parts/src/compress.rs | 4 + encodings/datetime-parts/src/compute/cast.rs | 1 + encodings/datetime-parts/src/compute/take.rs | 2 + .../src/decimal_byte_parts/compute/cast.rs | 2 + .../fastlanes/benches/compute_between.rs | 2 + .../src/bitpacking/array/bitpack_compress.rs | 8 ++ .../bitpacking/array/bitpack_decompress.rs | 9 +++ .../fastlanes/src/bitpacking/array/mod.rs | 9 ++- .../src/bitpacking/compute/filter.rs | 8 +- .../src/bitpacking/compute/is_constant.rs | 3 + .../fastlanes/src/bitpacking/compute/take.rs | 6 +- .../src/delta/array/delta_compress.rs | 1 + .../fastlanes/src/delta/vtable/operations.rs | 2 + .../fastlanes/src/for/array/for_compress.rs | 2 + .../fastlanes/src/for/compute/is_sorted.rs | 2 + encodings/fastlanes/src/lib.rs | 2 + encodings/fastlanes/src/rle/array/mod.rs | 8 ++ .../fastlanes/src/rle/array/rle_compress.rs | 3 + encodings/fastlanes/src/rle/compute/cast.rs | 1 + .../fastlanes/src/rle/vtable/operations.rs | 4 + encodings/fsst/src/canonical.rs | 2 + encodings/fsst/src/compute/compare.rs | 3 + encodings/fsst/src/compute/like.rs | 2 + encodings/fsst/src/tests.rs | 2 + encodings/pco/src/array.rs | 5 +- encodings/pco/src/tests.rs | 2 + encodings/runend/src/compress.rs | 11 ++- encodings/runend/src/compute/cast.rs | 1 + encodings/runend/src/compute/take.rs | 2 + encodings/runend/src/compute/take_from.rs | 16 +++- encodings/runend/src/decompress_bool.rs | 2 + encodings/sequence/src/compress.rs | 4 + encodings/sequence/src/compute/cast.rs | 1 + encodings/sparse/src/canonical.rs | 2 + encodings/sparse/src/compute/cast.rs | 2 + encodings/sparse/src/lib.rs | 23 +++--- encodings/sparse/src/ops.rs | 2 + encodings/zigzag/src/array.rs | 2 + encodings/zigzag/src/compress.rs | 29 +++---- encodings/zigzag/src/compute/mod.rs | 2 + encodings/zstd/src/array.rs | 9 ++- encodings/zstd/src/compute/cast.rs | 2 + encodings/zstd/src/test.rs | 6 ++ fuzz/fuzz_targets/file_io.rs | 8 +- fuzz/src/array/cast.rs | 79 ++++++++++--------- fuzz/src/array/compare.rs | 56 +++++++------ fuzz/src/array/fill_null.rs | 20 +++-- fuzz/src/array/filter.rs | 6 ++ fuzz/src/array/mask.rs | 2 + fuzz/src/array/mod.rs | 61 +++++++------- fuzz/src/array/scalar_at.rs | 42 +++++----- fuzz/src/array/search_sorted.rs | 5 ++ fuzz/src/array/slice.rs | 8 ++ fuzz/src/array/sort.rs | 5 ++ fuzz/src/array/take.rs | 6 ++ fuzz/src/compress.rs | 1 + vortex-array/benches/take_patches.rs | 17 ++-- vortex-array/benches/varbinview_compact.rs | 4 +- vortex-array/src/array/erased.rs | 5 +- vortex-array/src/array/typed.rs | 5 +- vortex-array/src/arrays/arbitrary.rs | 13 +-- vortex-array/src/arrays/bool/compute/take.rs | 2 +- .../src/arrays/bool/vtable/operations.rs | 4 +- vortex-array/src/arrays/chunked/array.rs | 24 +++--- .../src/arrays/chunked/compute/take.rs | 2 +- .../src/arrays/chunked/compute/zip.rs | 2 +- .../src/arrays/chunked/paired_chunks.rs | 3 +- vortex-array/src/arrays/chunked/tests.rs | 6 +- .../src/arrays/chunked/vtable/canonical.rs | 6 +- vortex-array/src/arrays/chunked/vtable/mod.rs | 2 +- .../src/arrays/constant/compute/take.rs | 4 +- .../src/arrays/constant/vtable/canonical.rs | 52 ++++++++---- .../src/arrays/decimal/compute/cast.rs | 20 ++--- .../src/arrays/decimal/compute/fill_null.rs | 8 +- vortex-array/src/arrays/dict/array.rs | 4 +- vortex-array/src/arrays/dict/compute/cast.rs | 13 ++- .../src/arrays/dict/compute/fill_null.rs | 2 +- vortex-array/src/arrays/dict/compute/mod.rs | 8 +- .../src/arrays/extension/compute/cast.rs | 13 ++- .../src/arrays/extension/compute/rules.rs | 7 +- .../src/arrays/filter/execute/bool.rs | 2 +- .../src/arrays/filter/execute/listview.rs | 10 ++- .../src/arrays/filter/execute/primitive.rs | 2 +- .../arrays/fixed_size_list/tests/nested.rs | 14 +++- vortex-array/src/arrays/list/array.rs | 5 +- vortex-array/src/arrays/list/compute/cast.rs | 20 ++--- vortex-array/src/arrays/list/compute/take.rs | 8 +- vortex-array/src/arrays/listview/array.rs | 28 +++---- .../src/arrays/listview/conversion.rs | 4 +- vortex-array/src/arrays/listview/rebuild.rs | 11 ++- .../src/arrays/listview/tests/filter.rs | 10 ++- .../src/arrays/listview/tests/take.rs | 9 ++- vortex-array/src/arrays/masked/tests.rs | 2 +- vortex-array/src/arrays/null/compute/mod.rs | 4 +- vortex-array/src/arrays/null/compute/take.rs | 2 +- .../src/arrays/patched/compute/take.rs | 11 +-- .../src/arrays/primitive/array/accessor.rs | 2 +- .../src/arrays/primitive/array/mod.rs | 41 ++++++---- .../src/arrays/primitive/array/patch.rs | 5 +- .../src/arrays/primitive/compute/cast.rs | 24 +++--- .../src/arrays/primitive/compute/fill_null.rs | 8 +- .../src/arrays/struct_/compute/cast.rs | 10 ++- .../src/arrays/struct_/compute/rules.rs | 6 +- vortex-array/src/arrays/varbin/accessor.rs | 3 +- vortex-array/src/arrays/varbin/array.rs | 2 +- .../src/arrays/varbin/compute/compare.rs | 4 +- .../src/arrays/varbinview/accessor.rs | 2 +- .../src/arrays/varbinview/compute/mod.rs | 13 ++- .../src/arrays/varbinview/compute/take.rs | 26 +++--- .../src/arrays/varbinview/compute/zip.rs | 2 +- vortex-array/src/arrays/varbinview/tests.rs | 2 +- vortex-array/src/arrow/record_batch.rs | 5 +- vortex-array/src/builders/bool.rs | 5 +- vortex-array/src/builders/decimal.rs | 2 +- vortex-array/src/builders/dict/bytes.rs | 36 ++++----- vortex-array/src/builders/dict/mod.rs | 3 +- vortex-array/src/builders/dict/primitive.rs | 5 +- vortex-array/src/builders/extension.rs | 2 +- vortex-array/src/builders/fixed_size_list.rs | 33 ++++---- vortex-array/src/builders/list.rs | 17 ++-- vortex-array/src/builders/listview.rs | 3 +- vortex-array/src/builders/primitive.rs | 2 +- vortex-array/src/builders/struct_.rs | 2 +- vortex-array/src/builders/tests.rs | 2 +- vortex-array/src/builders/varbinview.rs | 2 +- vortex-array/src/canonical.rs | 63 +++++++-------- .../src/compute/conformance/binary_numeric.rs | 4 +- .../src/compute/conformance/consistency.rs | 21 +++-- vortex-array/src/compute/conformance/take.rs | 18 ++--- vortex-array/src/display/mod.rs | 2 +- vortex-array/src/normalize.rs | 5 +- vortex-array/src/patches.rs | 11 +-- .../src/scalar_fn/fns/binary/compare.rs | 7 +- .../src/scalar_fn/fns/list_contains/mod.rs | 21 +++-- vortex-array/src/scalar_fn/fns/merge.rs | 24 +++--- vortex-array/src/scalar_fn/fns/not/mod.rs | 12 +-- vortex-array/src/scalar_fn/fns/pack.rs | 21 +++-- vortex-array/src/scalar_fn/fns/select.rs | 4 +- vortex-bench/src/datasets/tpch_l_comment.rs | 15 ++-- vortex-btrblocks/benches/compress.rs | 2 + vortex-btrblocks/src/schemes/decimal.rs | 2 + vortex-btrblocks/src/schemes/float.rs | 2 + vortex-btrblocks/src/schemes/integer.rs | 72 +++++++++-------- vortex-btrblocks/src/schemes/patches.rs | 8 +- vortex-btrblocks/src/schemes/string.rs | 20 +++-- vortex-btrblocks/src/schemes/temporal.rs | 31 +++----- vortex-compressor/src/builtins/dict/float.rs | 2 + .../src/builtins/dict/integer.rs | 2 + vortex-compressor/src/compressor.rs | 21 ++--- vortex-compressor/src/stats/cache.rs | 17 +++- vortex-compressor/src/stats/float.rs | 2 + vortex-cuda/benches/dynamic_dispatch_cuda.rs | 2 + vortex-cuda/gpu-scan-cli/src/main.rs | 4 +- vortex-cuda/src/arrow/canonical.rs | 2 + vortex-cuda/src/dynamic_dispatch/mod.rs | 3 + vortex-cuda/src/kernel/patches/mod.rs | 7 +- vortex-duckdb/src/convert/vector.rs | 1 + vortex-duckdb/src/exporter/dict.rs | 1 + vortex-ffi/src/array.rs | 6 +- vortex-ffi/src/expression.rs | 1 + vortex-ffi/src/struct_array.rs | 2 + vortex-file/src/tests.rs | 30 +++++++ vortex-file/tests/test_write_table.rs | 3 + vortex-jni/src/array.rs | 23 +++--- vortex-layout/src/layouts/dict/reader.rs | 13 ++- vortex-layout/src/layouts/file_stats.rs | 2 + vortex-layout/src/layouts/flat/writer.rs | 35 ++++---- vortex-layout/src/layouts/repartition.rs | 15 +++- vortex-layout/src/layouts/row_idx/mod.rs | 4 +- vortex-layout/src/layouts/struct_/reader.rs | 4 + vortex-layout/src/layouts/table.rs | 2 + vortex-layout/src/layouts/zoned/reader.rs | 2 + vortex-layout/src/layouts/zoned/zone_map.rs | 2 + vortex-layout/src/scan/scan_builder.rs | 5 +- vortex-python/src/arrays/compressed.rs | 7 +- vortex-python/src/arrays/mod.rs | 11 ++- vortex-python/src/dataset.rs | 5 +- vortex-python/src/file.rs | 8 +- vortex-tui/src/browse/ui/layouts.rs | 2 + .../common_encoding_tree_throughput.rs | 13 ++- vortex/benches/single_encoding_throughput.rs | 3 + 191 files changed, 1114 insertions(+), 684 deletions(-) diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index 8a86019dcf9..dab2e00fa40 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -519,6 +519,8 @@ impl ValidityChild for ALP { #[cfg(test)] mod tests { + #![expect(deprecated)] + use std::f64::consts::PI; use std::sync::LazyLock; diff --git a/encodings/alp/src/alp/compress.rs b/encodings/alp/src/alp/compress.rs index 059c4b8821c..d1b111e84a0 100644 --- a/encodings/alp/src/alp/compress.rs +++ b/encodings/alp/src/alp/compress.rs @@ -131,6 +131,8 @@ where #[cfg(test)] mod tests { + #![expect(deprecated)] + use core::f64; use f64::consts::E; diff --git a/encodings/alp/src/alp/compute/cast.rs b/encodings/alp/src/alp/compute/cast.rs index b6ce03b9eee..76c0d9ca216 100644 --- a/encodings/alp/src/alp/compute/cast.rs +++ b/encodings/alp/src/alp/compute/cast.rs @@ -58,6 +58,8 @@ impl CastReduce for ALP { #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; diff --git a/encodings/alp/src/alp/compute/compare.rs b/encodings/alp/src/alp/compute/compare.rs index ebda0a7797c..cc4460595b0 100644 --- a/encodings/alp/src/alp/compute/compare.rs +++ b/encodings/alp/src/alp/compute/compare.rs @@ -150,6 +150,8 @@ where #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::LEGACY_SESSION; diff --git a/encodings/alp/src/alp/compute/filter.rs b/encodings/alp/src/alp/compute/filter.rs index c305ea5e99b..1c3cf1efb41 100644 --- a/encodings/alp/src/alp/compute/filter.rs +++ b/encodings/alp/src/alp/compute/filter.rs @@ -41,6 +41,8 @@ impl FilterKernel for ALP { #[cfg(test)] mod test { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; diff --git a/encodings/alp/src/alp/compute/mask.rs b/encodings/alp/src/alp/compute/mask.rs index 7b9757376d9..18dd99554e5 100644 --- a/encodings/alp/src/alp/compute/mask.rs +++ b/encodings/alp/src/alp/compute/mask.rs @@ -54,6 +54,8 @@ impl MaskKernel for ALP { #[cfg(test)] mod test { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; diff --git a/encodings/alp/src/alp/compute/take.rs b/encodings/alp/src/alp/compute/take.rs index 3fcfa7c9f77..792eae732f2 100644 --- a/encodings/alp/src/alp/compute/take.rs +++ b/encodings/alp/src/alp/compute/take.rs @@ -40,6 +40,8 @@ impl TakeExecute for ALP { #[cfg(test)] mod test { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index ae224c52b7d..92db50770f2 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -418,7 +418,9 @@ impl ALPRDData { let mut patches = patches.cast_values(&left_parts.dtype().as_nonnullable())?; // Force execution of the lazy cast so patch values are materialized // before serialization. - *patches.values_mut() = patches.values().to_canonical()?.into_array(); + #[expect(deprecated)] + let canonical = patches.values().to_canonical()?.into_array(); + *patches.values_mut() = canonical; Ok(patches) }) .transpose() @@ -658,6 +660,8 @@ impl ValidityChild for ALPRD { #[cfg(test)] mod test { + #![expect(deprecated)] + use prost::Message; use rstest::rstest; use vortex_array::ToCanonical; diff --git a/encodings/alp/src/alp_rd/compute/cast.rs b/encodings/alp/src/alp_rd/compute/cast.rs index 86b6ff9c331..36b34f82b6c 100644 --- a/encodings/alp/src/alp_rd/compute/cast.rs +++ b/encodings/alp/src/alp_rd/compute/cast.rs @@ -48,6 +48,8 @@ impl CastReduce for ALPRD { #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/alp/src/alp_rd/compute/take.rs b/encodings/alp/src/alp_rd/compute/take.rs index 12cf8e935c1..8d9f383df71 100644 --- a/encodings/alp/src/alp_rd/compute/take.rs +++ b/encodings/alp/src/alp_rd/compute/take.rs @@ -56,6 +56,8 @@ impl TakeExecute for ALPRD { #[cfg(test)] mod test { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/datetime-parts/src/compress.rs b/encodings/datetime-parts/src/compress.rs index 2edb6097c7b..96d8c354c48 100644 --- a/encodings/datetime-parts/src/compress.rs +++ b/encodings/datetime-parts/src/compress.rs @@ -3,6 +3,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::TemporalArray; @@ -26,9 +27,11 @@ pub struct TemporalParts { /// Splitting the components by granularity creates more small values, which enables better /// cascading compression. pub fn split_temporal(array: TemporalArray) -> VortexResult { + #[expect(deprecated)] let temporal_values = array.temporal_values().to_primitive(); // After this operation, timestamps will be a PrimitiveArray + #[expect(deprecated)] let timestamps = temporal_values .clone() .into_array() @@ -80,6 +83,7 @@ impl TryFrom for DateTimePartsData { #[cfg(test)] mod tests { + #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; diff --git a/encodings/datetime-parts/src/compute/cast.rs b/encodings/datetime-parts/src/compute/cast.rs index 0e56d594dcb..af32d0d988a 100644 --- a/encodings/datetime-parts/src/compute/cast.rs +++ b/encodings/datetime-parts/src/compute/cast.rs @@ -33,6 +33,7 @@ impl CastReduce for DateTimeParts { #[cfg(test)] mod tests { + #![expect(deprecated)] use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; diff --git a/encodings/datetime-parts/src/compute/take.rs b/encodings/datetime-parts/src/compute/take.rs index cd15c466b2a..f5f67836e56 100644 --- a/encodings/datetime-parts/src/compute/take.rs +++ b/encodings/datetime-parts/src/compute/take.rs @@ -5,6 +5,7 @@ use vortex_array::ArrayRef; use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::dict::TakeExecute; use vortex_array::builtins::ArrayBuiltins; @@ -22,6 +23,7 @@ fn take_datetime_parts( indices: &ArrayRef, ) -> VortexResult { // we go ahead and canonicalize here to avoid worst-case canonicalizing 3 separate times + #[expect(deprecated)] let indices = indices.to_primitive(); let taken_days = array.days().take(indices.clone().into_array())?; diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs index e554bbfae71..6bb1359f7e9 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs @@ -45,6 +45,8 @@ impl CastReduce for DecimalByteParts { #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/fastlanes/benches/compute_between.rs b/encodings/fastlanes/benches/compute_between.rs index 49f518a7949..d43a2d91639 100644 --- a/encodings/fastlanes/benches/compute_between.rs +++ b/encodings/fastlanes/benches/compute_between.rs @@ -12,6 +12,7 @@ use vortex_alp::alp_encode; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -58,6 +59,7 @@ fn generate_alp_bit_pack_primitive_array( ) .vortex_expect(""); + #[expect(deprecated)] let encoded = alp.encoded().to_primitive(); let bp = bitpack_to_best_bit_width(&encoded) diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs index 727e69dad04..537e7c07a94 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_compress.rs @@ -389,6 +389,7 @@ pub mod test_harness { use rand::rngs::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::validity::Validity; @@ -413,6 +414,7 @@ pub mod test_harness { }) .collect::>(); + #[expect(deprecated)] let values = if fraction_null == 0.0 { values.into_array().to_primitive() } else { @@ -430,6 +432,7 @@ mod test { use rand::SeedableRng; use rand::rngs::StdRng; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::ChunkedArray; @@ -506,6 +509,7 @@ mod test { .collect::>(); let chunked = ChunkedArray::from_iter(chunks).into_array(); + #[expect(deprecated)] let into_ca = chunked.to_primitive(); let mut primitive_builder = PrimitiveBuilder::::with_capacity(chunked.dtype().nullability(), 10 * 100); @@ -538,6 +542,7 @@ mod test { let bitpacked = bitpack_encode(&array, 4, None).unwrap(); let patches = bitpacked.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().as_ref().unwrap().to_primitive(); // chunk 0 (0-1023): patches at 100, 200 -> starts at patch index 0 @@ -561,6 +566,7 @@ mod test { let bitpacked = bitpack_encode(&array, 4, None).unwrap(); let patches = bitpacked.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().as_ref().unwrap().to_primitive(); assert_arrays_eq!(chunk_offsets, PrimitiveArray::from_iter([0u64, 2, 2])); @@ -580,6 +586,7 @@ mod test { let bitpacked = bitpack_encode(&array, 4, None).unwrap(); let patches = bitpacked.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().as_ref().unwrap().to_primitive(); // chunk 0 (0-1023): patches at 100, 200 -> starts at patch index 0 @@ -604,6 +611,7 @@ mod test { let bitpacked = bitpack_encode(&array, 4, None).unwrap(); let patches = bitpacked.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().as_ref().unwrap().to_primitive(); // Single chunk starting at patch index 0. diff --git a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs index 337f82691a6..4ddbd1832cc 100644 --- a/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs +++ b/encodings/fastlanes/src/bitpacking/array/bitpack_decompress.rs @@ -160,6 +160,7 @@ mod tests { use vortex_array::Canonical; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::assert_arrays_eq; @@ -219,6 +220,7 @@ mod tests { #[test] fn test_all_zeros() -> VortexResult<()> { + #[expect(deprecated)] let zeros = buffer![0u16, 0, 0, 0].into_array().to_primitive(); let bitpacked = encode(&zeros, 0); let actual = unpack(&bitpacked)?; @@ -228,6 +230,7 @@ mod tests { #[test] fn test_simple_patches() -> VortexResult<()> { + #[expect(deprecated)] let zeros = buffer![0u16, 1, 0, 1].into_array().to_primitive(); let bitpacked = encode(&zeros, 0); let actual = unpack(&bitpacked)?; @@ -237,6 +240,7 @@ mod tests { #[test] fn test_one_full_chunk() -> VortexResult<()> { + #[expect(deprecated)] let zeros = BufferMut::from_iter(0u16..1024).into_array().to_primitive(); let bitpacked = encode(&zeros, 10); let actual = unpack(&bitpacked)?; @@ -246,6 +250,7 @@ mod tests { #[test] fn test_three_full_chunks_with_patches() -> VortexResult<()> { + #[expect(deprecated)] let zeros = BufferMut::from_iter((5u16..1029).chain(5u16..1029).chain(5u16..1029)) .into_array() .to_primitive(); @@ -261,6 +266,7 @@ mod tests { #[test] fn test_one_full_chunk_and_one_short_chunk_no_patch() -> VortexResult<()> { + #[expect(deprecated)] let zeros = BufferMut::from_iter(0u16..1025).into_array().to_primitive(); let bitpacked = encode(&zeros, 11); assert!(bitpacked.patches().is_none()); @@ -271,6 +277,7 @@ mod tests { #[test] fn test_one_full_chunk_and_one_short_chunk_with_patches() -> VortexResult<()> { + #[expect(deprecated)] let zeros = BufferMut::from_iter(512u16..1537) .into_array() .to_primitive(); @@ -284,6 +291,7 @@ mod tests { #[test] fn test_offset_and_short_chunk_and_patches() -> VortexResult<()> { + #[expect(deprecated)] let zeros = BufferMut::from_iter(512u16..1537) .into_array() .to_primitive(); @@ -304,6 +312,7 @@ mod tests { #[test] fn test_offset_and_short_chunk_with_chunks_between_and_patches() -> VortexResult<()> { + #[expect(deprecated)] let zeros = BufferMut::from_iter(512u16..2741) .into_array() .to_primitive(); diff --git a/encodings/fastlanes/src/bitpacking/array/mod.rs b/encodings/fastlanes/src/bitpacking/array/mod.rs index dbca8c0e48b..ba5029260a7 100644 --- a/encodings/fastlanes/src/bitpacking/array/mod.rs +++ b/encodings/fastlanes/src/bitpacking/array/mod.rs @@ -333,6 +333,7 @@ impl> BitPackedArrayExt for T {} #[cfg(test)] mod test { use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -355,7 +356,9 @@ mod test { let uncompressed = PrimitiveArray::from_option_iter(values); let packed = BitPackedData::encode(&uncompressed.into_array(), 1).unwrap(); let expected = PrimitiveArray::from_option_iter(values); - assert_arrays_eq!(packed.as_array().to_primitive(), expected); + #[expect(deprecated)] + let packed_primitive = packed.as_array().to_primitive(); + assert_arrays_eq!(packed_primitive, expected); } #[test] @@ -375,8 +378,10 @@ mod test { let packed_with_patches = BitPackedData::encode(&parray, 9).unwrap(); assert!(packed_with_patches.patches().is_some()); + #[expect(deprecated)] + let packed_primitive = packed_with_patches.as_array().to_primitive(); assert_arrays_eq!( - packed_with_patches.as_array().to_primitive(), + packed_primitive, PrimitiveArray::new(values, vortex_array::validity::Validity::NonNullable) ); } diff --git a/encodings/fastlanes/src/bitpacking/compute/filter.rs b/encodings/fastlanes/src/bitpacking/compute/filter.rs index aa3ca07d0b0..1b161889560 100644 --- a/encodings/fastlanes/src/bitpacking/compute/filter.rs +++ b/encodings/fastlanes/src/bitpacking/compute/filter.rs @@ -178,6 +178,7 @@ fn filter_with_indices( #[cfg(test)] mod test { use vortex_array::IntoArray as _; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -225,8 +226,10 @@ mod test { let filtered = bitpacked .filter(Mask::from_indices(4096, (0..1024).collect())) .unwrap(); + #[expect(deprecated)] + let filtered_prim = filtered.to_primitive(); assert_arrays_eq!( - filtered.to_primitive(), + filtered_prim, PrimitiveArray::from_iter((0..1024).map(|i| (i % 63) as u8)) ); } @@ -236,6 +239,7 @@ mod test { let values: Buffer = (0..500).collect(); let unpacked = PrimitiveArray::new(values.clone(), Validity::NonNullable); let bitpacked = BitPackedData::encode(&unpacked.into_array(), 9).unwrap(); + #[expect(deprecated)] let filtered = bitpacked .filter(Mask::from_indices(values.len(), (0..250).collect())) .unwrap() @@ -283,6 +287,7 @@ mod test { ); // Filter to include some patched and some non-patched values. + #[expect(deprecated)] let filtered = bitpacked .filter(Mask::from_indices(values.len(), vec![0, 2, 5, 9])) .unwrap() @@ -316,6 +321,7 @@ mod test { // Use low selectivity (only select 2% of values) to avoid full decompression. let indices: Vec = (0..20).collect(); + #[expect(deprecated)] let filtered = bitpacked .filter(Mask::from_indices(values.len(), indices)) .unwrap() diff --git a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs index 94f3feea46f..cdf27dade75 100644 --- a/encodings/fastlanes/src/bitpacking/compute/is_constant.rs +++ b/encodings/fastlanes/src/bitpacking/compute/is_constant.rs @@ -8,6 +8,7 @@ use lending_iterator::LendingIterator; use vortex_array::ArrayRef; use vortex_array::ArrayView; use vortex_array::ExecutionCtx; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::aggregate_fn::AggregateFnRef; use vortex_array::aggregate_fn::fns::is_constant::IsConstant; @@ -57,7 +58,9 @@ fn bitpacked_is_constant( ) -> VortexResult { let mut bit_unpack_iterator = array.unpacked_chunks::()?; let patches = array.patches().map(|p| { + #[expect(deprecated)] let values = p.values().to_primitive(); + #[expect(deprecated)] let indices = p.indices().to_primitive(); let offset = p.offset(); (indices, values, offset) diff --git a/encodings/fastlanes/src/bitpacking/compute/take.rs b/encodings/fastlanes/src/bitpacking/compute/take.rs index 4ff2b484818..b7ea83513c7 100644 --- a/encodings/fastlanes/src/bitpacking/compute/take.rs +++ b/encodings/fastlanes/src/bitpacking/compute/take.rs @@ -166,6 +166,7 @@ mod test { use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -281,9 +282,10 @@ mod test { taken_primitive, PrimitiveArray::from_option_iter([Some(1i32), Some(2), None, Some(4)]) ); + #[expect(deprecated)] + let taken_primitive_prim = taken_primitive.to_primitive(); assert_eq!( - taken_primitive - .to_primitive() + taken_primitive_prim .invalid_count(&mut LEGACY_SESSION.create_execution_ctx()) .unwrap(), 1 diff --git a/encodings/fastlanes/src/delta/array/delta_compress.rs b/encodings/fastlanes/src/delta/array/delta_compress.rs index 105004c0c71..72403c5e8ab 100644 --- a/encodings/fastlanes/src/delta/array/delta_compress.rs +++ b/encodings/fastlanes/src/delta/array/delta_compress.rs @@ -92,6 +92,7 @@ where #[cfg(test)] mod tests { + #![expect(deprecated)] use std::sync::LazyLock; use rstest::rstest; diff --git a/encodings/fastlanes/src/delta/vtable/operations.rs b/encodings/fastlanes/src/delta/vtable/operations.rs index d0c0606ea93..72e8c2ab835 100644 --- a/encodings/fastlanes/src/delta/vtable/operations.rs +++ b/encodings/fastlanes/src/delta/vtable/operations.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::scalar::Scalar; use vortex_array::vtable::OperationsVTable; @@ -16,6 +17,7 @@ impl OperationsVTable for Delta { index: usize, ctx: &mut ExecutionCtx, ) -> VortexResult { + #[expect(deprecated)] let decompressed = array.array().slice(index..index + 1)?.to_primitive(); decompressed.into_array().execute_scalar(0, ctx) } diff --git a/encodings/fastlanes/src/for/array/for_compress.rs b/encodings/fastlanes/src/for/array/for_compress.rs index f27379a866f..0be93fa955d 100644 --- a/encodings/fastlanes/src/for/array/for_compress.rs +++ b/encodings/fastlanes/src/for/array/for_compress.rs @@ -52,6 +52,7 @@ mod test { use std::sync::LazyLock; use itertools::Itertools; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::primitive::PrimitiveArrayExt; @@ -166,6 +167,7 @@ mod test { .unwrap() ); + #[expect(deprecated)] let encoded = compressed .encoded() .to_primitive() diff --git a/encodings/fastlanes/src/for/compute/is_sorted.rs b/encodings/fastlanes/src/for/compute/is_sorted.rs index 92cd8b36888..eba41b07927 100644 --- a/encodings/fastlanes/src/for/compute/is_sorted.rs +++ b/encodings/fastlanes/src/for/compute/is_sorted.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::aggregate_fn::AggregateFnRef; use vortex_array::aggregate_fn::fns::is_sorted::IsSorted; @@ -35,6 +36,7 @@ impl DynAggregateKernel for FoRIsSortedKernel { return Ok(None); }; + #[expect(deprecated)] let encoded = array.encoded().to_primitive(); let unsigned_array = PrimitiveArray::from_buffer_handle( encoded.buffer_handle().clone(), diff --git a/encodings/fastlanes/src/lib.rs b/encodings/fastlanes/src/lib.rs index bed17366676..0041cf99b15 100644 --- a/encodings/fastlanes/src/lib.rs +++ b/encodings/fastlanes/src/lib.rs @@ -7,6 +7,7 @@ pub use bitpacking::*; pub use delta::*; pub use r#for::*; pub use rle::*; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::bool::BoolArrayExt; use vortex_array::validity::Validity; @@ -82,6 +83,7 @@ pub(crate) fn fill_forward_nulls( Validity::NonNullable | Validity::AllValid => values, Validity::AllInvalid => Buffer::zeroed(values.len()), Validity::Array(validity_array) => { + #[expect(deprecated)] let bit_buffer = validity_array.to_bool().to_bit_buffer(); let mut last_valid = T::default(); match values.try_into_mut() { diff --git a/encodings/fastlanes/src/rle/array/mod.rs b/encodings/fastlanes/src/rle/array/mod.rs index 5c9ab27c33a..d8f822c19ff 100644 --- a/encodings/fastlanes/src/rle/array/mod.rs +++ b/encodings/fastlanes/src/rle/array/mod.rs @@ -142,6 +142,7 @@ mod tests { use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -236,6 +237,7 @@ mod tests { let rle_array = RLE::try_new(values, indices_with_validity, values_idx_offsets, 0, 5) .vortex_expect("RLEData is always valid"); + #[expect(deprecated)] let valid_slice = rle_array.slice(0..3).unwrap().to_primitive(); // TODO(joe): replace with compute null count let mut ctx = SESSION.create_execution_ctx(); @@ -364,6 +366,7 @@ mod tests { let rle_array = RLEData::encode(primitive.as_view()).unwrap(); assert_eq!(rle_array.len(), 2048); + #[expect(deprecated)] let original_data = rle_array.as_array().to_primitive(); let ctx = ArrayContext::empty(); @@ -388,6 +391,7 @@ mod tests { ) .unwrap(); + #[expect(deprecated)] let decoded_data = decoded.to_primitive(); assert_arrays_eq!(original_data, decoded_data); @@ -431,7 +435,9 @@ mod tests { ) .unwrap(); + #[expect(deprecated)] let original_data = sliced.as_array().to_primitive(); + #[expect(deprecated)] let decoded_data = decoded.to_primitive(); assert_arrays_eq!(original_data, decoded_data); @@ -459,6 +465,7 @@ mod tests { // Simulate cascading compression: narrow u16->u8 then re-encode with RLE, // matching the path taken by the BtrBlocks compressor. + #[expect(deprecated)] let indices_prim = rle.indices().to_primitive().narrow()?; let re_encoded = RLEData::encode(indices_prim.as_view())?; @@ -475,6 +482,7 @@ mod tests { }; // Decompress — panicked before the fill_forward_nulls chunk-boundary fix. + #[expect(deprecated)] let decoded = reconstructed.as_array().to_primitive(); assert_arrays_eq!(decoded, original); Ok(()) diff --git a/encodings/fastlanes/src/rle/array/rle_compress.rs b/encodings/fastlanes/src/rle/array/rle_compress.rs index e19ed3efc8b..eb81ceb00e6 100644 --- a/encodings/fastlanes/src/rle/array/rle_compress.rs +++ b/encodings/fastlanes/src/rle/array/rle_compress.rs @@ -6,6 +6,7 @@ use std::mem; use fastlanes::RLE as FastLanesRLE; use vortex_array::ArrayView; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::Primitive; use vortex_array::arrays::PrimitiveArray; @@ -138,6 +139,7 @@ fn padded_validity(array: &PrimitiveArray) -> Validity { let mut builder = BitBufferMut::with_capacity(padded_len); + #[expect(deprecated)] let bool_array = validity_array.to_bool(); builder.append_buffer(&bool_array.to_bit_buffer()); builder.append_n(false, padded_len - len); @@ -149,6 +151,7 @@ fn padded_validity(array: &PrimitiveArray) -> Validity { #[cfg(test)] mod tests { + #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/fastlanes/src/rle/compute/cast.rs b/encodings/fastlanes/src/rle/compute/cast.rs index 2123d74f136..6cd43cd93c1 100644 --- a/encodings/fastlanes/src/rle/compute/cast.rs +++ b/encodings/fastlanes/src/rle/compute/cast.rs @@ -44,6 +44,7 @@ impl CastReduce for RLE { #[cfg(test)] mod tests { + #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::arrays::PrimitiveArray; diff --git a/encodings/fastlanes/src/rle/vtable/operations.rs b/encodings/fastlanes/src/rle/vtable/operations.rs index 2776418c231..1273e019dec 100644 --- a/encodings/fastlanes/src/rle/vtable/operations.rs +++ b/encodings/fastlanes/src/rle/vtable/operations.rs @@ -43,6 +43,7 @@ impl OperationsVTable for RLE { mod tests { use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -174,6 +175,7 @@ mod tests { let expected: Vec = (0..3000).map(|i| (i / 50) as u16).collect(); let array = values.into_array(); + #[expect(deprecated)] let encoded = RLEData::encode(array.to_primitive().as_view()).unwrap(); // Access scalars from multiple chunks. @@ -264,6 +266,7 @@ mod tests { #[test] fn test_slice_decode_with_nulls() { let array = fixture::rle_array_with_nulls(); + #[expect(deprecated)] let sliced = array.slice(1..4).unwrap().to_primitive(); // [null, 20, 20] let expected = PrimitiveArray::from_option_iter([Option::::None, Some(20), Some(20)]); @@ -284,6 +287,7 @@ mod tests { let expected: Vec = (0..2100).map(|i| (i / 100) as u32).collect(); let array = values.into_array(); + #[expect(deprecated)] let encoded = RLEData::encode(array.to_primitive().as_view()).unwrap(); // Slice across first and second chunk. diff --git a/encodings/fsst/src/canonical.rs b/encodings/fsst/src/canonical.rs index 35730c9a1f0..9853cd3956e 100644 --- a/encodings/fsst/src/canonical.rs +++ b/encodings/fsst/src/canonical.rs @@ -95,6 +95,7 @@ mod tests { use rand::prelude::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -185,6 +186,7 @@ mod tests { }; { + #[expect(deprecated)] let arr2 = chunked_arr.as_array().to_varbinview(); let res2 = arr2.with_iterator(|iter| iter.map(|b| b.map(|v| v.to_vec())).collect::>()); diff --git a/encodings/fsst/src/compute/compare.rs b/encodings/fsst/src/compute/compare.rs index 2ae2cf0ff40..f641e52d8bf 100644 --- a/encodings/fsst/src/compute/compare.rs +++ b/encodings/fsst/src/compute/compare.rs @@ -123,6 +123,7 @@ fn compare_fsst_constant( #[cfg(test)] mod tests { use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; use vortex_array::arrays::ConstantArray; @@ -158,6 +159,7 @@ mod tests { let rhs = ConstantArray::new("world", lhs.len()); // Ensure fastpath for Eq exists, and returns correct answer + #[expect(deprecated)] let equals = lhs .clone() .into_array() @@ -173,6 +175,7 @@ mod tests { ); // Ensure fastpath for Eq exists, and returns correct answer + #[expect(deprecated)] let not_equals = lhs .clone() .into_array() diff --git a/encodings/fsst/src/compute/like.rs b/encodings/fsst/src/compute/like.rs index e5e8bba9cde..ef050435aba 100644 --- a/encodings/fsst/src/compute/like.rs +++ b/encodings/fsst/src/compute/like.rs @@ -5,6 +5,7 @@ use vortex_array::ArrayRef; use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; use vortex_array::arrays::varbin::VarBinArrayExt; @@ -58,6 +59,7 @@ impl LikeKernel for FSST { let negated = options.negated; let codes = array.codes(); + #[expect(deprecated)] let offsets = codes.offsets().to_primitive(); let all_bytes = codes.bytes(); let all_bytes = all_bytes.as_slice(); diff --git a/encodings/fsst/src/tests.rs b/encodings/fsst/src/tests.rs index fb45ed31629..441e217a883 100644 --- a/encodings/fsst/src/tests.rs +++ b/encodings/fsst/src/tests.rs @@ -3,6 +3,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::varbin::builder::VarBinBuilder; use vortex_array::assert_arrays_eq; @@ -95,6 +96,7 @@ fn test_fsst_array_ops() { ); // test to_canonical + #[expect(deprecated)] let canonical_array = fsst_array.to_varbinview().into_array(); assert_arrays_eq!(fsst_array, canonical_array); diff --git a/encodings/pco/src/array.rs b/encodings/pco/src/array.rs index 39a67e07ede..8ea7c72c44e 100644 --- a/encodings/pco/src/array.rs +++ b/encodings/pco/src/array.rs @@ -30,6 +30,7 @@ use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::Precision; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::Primitive; @@ -262,7 +263,9 @@ fn collect_valid(parray: ArrayView<'_, Primitive>) -> VortexResult VortexError { diff --git a/encodings/pco/src/tests.rs b/encodings/pco/src/tests.rs index b21bf121afc..1f318207aec 100644 --- a/encodings/pco/src/tests.rs +++ b/encodings/pco/src/tests.rs @@ -7,6 +7,7 @@ use std::sync::LazyLock; use vortex_array::ArrayContext; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -140,6 +141,7 @@ fn test_validity_and_multiple_chunks_and_pages() { let slice = compressed.slice(100..103).unwrap(); assert_nth_scalar!(slice, 0, 100); assert_nth_scalar!(slice, 2, 102); + #[expect(deprecated)] let primitive = slice.to_primitive(); let mut ctx = LEGACY_SESSION.create_execution_ctx(); diff --git a/encodings/runend/src/compress.rs b/encodings/runend/src/compress.rs index 65739507fd9..be0c30128a2 100644 --- a/encodings/runend/src/compress.rs +++ b/encodings/runend/src/compress.rs @@ -6,6 +6,7 @@ use vortex_array::ArrayRef; use vortex_array::ArrayView; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -53,7 +54,11 @@ pub fn runend_encode(array: ArrayView) -> (PrimitiveArray, ArrayRef) ConstantArray::new(Scalar::null(array.dtype().clone()), 1).into_array(), ); } - Validity::Array(a) => Some(a.to_bool().to_bit_buffer()), + Validity::Array(a) => { + #[expect(deprecated)] + let bool_array = a.to_bool(); + Some(bool_array.to_bit_buffer()) + } }; let (ends, values) = match validity { @@ -310,6 +315,7 @@ pub fn runend_decode_varbinview( #[cfg(test)] mod test { + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -325,6 +331,7 @@ mod test { fn encode() { let arr = PrimitiveArray::from_iter([1i32, 1, 2, 2, 2, 3, 3, 3, 3, 3]); let (ends, values) = runend_encode(arr.as_view()); + #[expect(deprecated)] let values = values.to_primitive(); let expected_ends = PrimitiveArray::from_iter(vec![2u8, 5, 10]); @@ -342,6 +349,7 @@ mod test { ])), ); let (ends, values) = runend_encode(arr.as_view()); + #[expect(deprecated)] let values = values.to_primitive(); let expected_ends = PrimitiveArray::from_iter(vec![2u8, 4, 5, 8, 10]); @@ -358,6 +366,7 @@ mod test { Validity::from(BitBuffer::new_unset(5)), ); let (ends, values) = runend_encode(arr.as_view()); + #[expect(deprecated)] let values = values.to_primitive(); let expected_ends = PrimitiveArray::from_iter(vec![5u64]); diff --git a/encodings/runend/src/compute/cast.rs b/encodings/runend/src/compute/cast.rs index dfda6b4cce5..1ec5b12585c 100644 --- a/encodings/runend/src/compute/cast.rs +++ b/encodings/runend/src/compute/cast.rs @@ -33,6 +33,7 @@ impl CastReduce for RunEnd { #[cfg(test)] mod tests { + #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; diff --git a/encodings/runend/src/compute/take.rs b/encodings/runend/src/compute/take.rs index 9bbdbf6784e..cf346ff81b3 100644 --- a/encodings/runend/src/compute/take.rs +++ b/encodings/runend/src/compute/take.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::ArrayView; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::dict::TakeExecute; @@ -60,6 +61,7 @@ pub fn take_indices_unchecked>( indices: &[T], validity: &Validity, ) -> VortexResult { + #[expect(deprecated)] let ends = array.ends().to_primitive(); let ends_len = ends.len(); diff --git a/encodings/runend/src/compute/take_from.rs b/encodings/runend/src/compute/take_from.rs index 4e913f5feae..52fbe7ddcc0 100644 --- a/encodings/runend/src/compute/take_from.rs +++ b/encodings/runend/src/compute/take_from.rs @@ -91,7 +91,9 @@ mod tests { .expect("kernel should return Some"); let expected = PrimitiveArray::from_iter([2i32, 2, 2, 3, 3, 2, 2]); - assert_arrays_eq!(result.to_canonical()?.into_array(), expected); + #[expect(deprecated)] + let canonical = result.to_canonical()?.into_array(); + assert_arrays_eq!(canonical, expected); Ok(()) } @@ -114,7 +116,9 @@ mod tests { .expect("kernel should return Some"); let expected = PrimitiveArray::from_iter([2i32, 3, 3]); - assert_arrays_eq!(result.to_canonical()?.into_array(), expected); + #[expect(deprecated)] + let canonical = result.to_canonical()?.into_array(); + assert_arrays_eq!(canonical, expected); Ok(()) } @@ -137,7 +141,9 @@ mod tests { .expect("kernel should return Some"); let expected = PrimitiveArray::from_iter([3i32, 3, 2, 2]); - assert_arrays_eq!(result.to_canonical()?.into_array(), expected); + #[expect(deprecated)] + let canonical = result.to_canonical()?.into_array(); + assert_arrays_eq!(canonical, expected); Ok(()) } @@ -160,7 +166,9 @@ mod tests { .expect("kernel should return Some"); let expected = PrimitiveArray::from_iter([3i32]); - assert_arrays_eq!(result.to_canonical()?.into_array(), expected); + #[expect(deprecated)] + let canonical = result.to_canonical()?.into_array(); + assert_arrays_eq!(canonical, expected); Ok(()) } diff --git a/encodings/runend/src/decompress_bool.rs b/encodings/runend/src/decompress_bool.rs index 69876b0a273..e10c314dc30 100644 --- a/encodings/runend/src/decompress_bool.rs +++ b/encodings/runend/src/decompress_bool.rs @@ -247,6 +247,7 @@ fn decode_nullable_sequential( #[cfg(test)] mod tests { use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -373,6 +374,7 @@ mod tests { BitBuffer::from(vec![true, false, true, false, true]), Validity::from(BitBuffer::from(vec![true, false, true, false, true])), ); + #[expect(deprecated)] let decoded = runend_decode_bools(ends, values, 0, 10000)?.to_bool(); // Check length and a few values diff --git a/encodings/sequence/src/compress.rs b/encodings/sequence/src/compress.rs index af92cd1ce53..2baaba5df5b 100644 --- a/encodings/sequence/src/compress.rs +++ b/encodings/sequence/src/compress.rs @@ -153,6 +153,7 @@ fn encode_primitive_array + CheckedAdd + CheckedSu mod tests { #[expect(unused_imports)] use itertools::Itertools; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -164,6 +165,7 @@ mod tests { let primitive_array = PrimitiveArray::from_iter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); let encoded = sequence_encode(primitive_array.as_view()).unwrap(); assert!(encoded.is_some()); + #[expect(deprecated)] let decoded = encoded.unwrap().to_primitive(); assert_arrays_eq!(decoded, primitive_array); } @@ -173,6 +175,7 @@ mod tests { let primitive_array = PrimitiveArray::from_iter([0]); let encoded = sequence_encode(primitive_array.as_view()).unwrap(); assert!(encoded.is_some()); + #[expect(deprecated)] let decoded = encoded.unwrap().to_primitive(); assert_arrays_eq!(decoded, primitive_array); } @@ -198,6 +201,7 @@ mod tests { let primitive_array = PrimitiveArray::from_iter(0u8..=255); let encoded = sequence_encode(primitive_array.as_view()).unwrap(); assert!(encoded.is_some()); + #[expect(deprecated)] let decoded = encoded.unwrap().to_primitive(); assert_arrays_eq!(decoded, primitive_array); } diff --git a/encodings/sequence/src/compute/cast.rs b/encodings/sequence/src/compute/cast.rs index 1eb9ddf47d8..09479b36eb9 100644 --- a/encodings/sequence/src/compute/cast.rs +++ b/encodings/sequence/src/compute/cast.rs @@ -87,6 +87,7 @@ impl CastReduce for Sequence { #[cfg(test)] mod tests { + #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/sparse/src/canonical.rs b/encodings/sparse/src/canonical.rs index a182aa4c781..86c078a3065 100644 --- a/encodings/sparse/src/canonical.rs +++ b/encodings/sparse/src/canonical.rs @@ -560,6 +560,8 @@ fn execute_varbin_inner( #[cfg(test)] mod test { + #![expect(deprecated)] + use std::sync::Arc; use rstest::rstest; diff --git a/encodings/sparse/src/compute/cast.rs b/encodings/sparse/src/compute/cast.rs index a9fe0046646..de8195b69b5 100644 --- a/encodings/sparse/src/compute/cast.rs +++ b/encodings/sparse/src/compute/cast.rs @@ -34,6 +34,8 @@ impl CastReduce for Sparse { #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/sparse/src/lib.rs b/encodings/sparse/src/lib.rs index ed5d0bf8ecc..61436f80dea 100644 --- a/encodings/sparse/src/lib.rs +++ b/encodings/sparse/src/lib.rs @@ -22,6 +22,7 @@ use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::Precision; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::ConstantArray; @@ -453,8 +454,9 @@ impl SparseData { fill.cast(array.dtype())? } else { // TODO(robert): Support other dtypes, only thing missing is getting most common value out of the array - let (top_pvalue, _) = array - .to_primitive() + #[expect(deprecated)] + let primitive = array.to_primitive(); + let (top_pvalue, _) = primitive .top_value()? .vortex_expect("Non empty or all null array"); @@ -462,13 +464,12 @@ impl SparseData { }; let fill_array = ConstantArray::new(fill.clone(), array.len()).into_array(); - let non_top_mask = Mask::from_buffer( - array - .binary(fill_array.clone(), Operator::NotEq)? - .fill_null(Scalar::bool(true, Nullability::NonNullable))? - .to_bool() - .to_bit_buffer(), - ); + #[expect(deprecated)] + let non_top_bool = array + .binary(fill_array.clone(), Operator::NotEq)? + .fill_null(Scalar::bool(true, Nullability::NonNullable))? + .to_bool(); + let non_top_mask = Mask::from_buffer(non_top_bool.to_bit_buffer()); let non_top_values = array .filter(non_top_mask.clone())? @@ -763,7 +764,9 @@ mod test { true, true, false, true, false, true, false, true, true, false, true, false, ]) ); - assert_arrays_eq!(sparse.to_primitive(), original); + #[expect(deprecated)] + let sparse_primitive = sparse.to_primitive(); + assert_arrays_eq!(sparse_primitive, original); } #[test] diff --git a/encodings/sparse/src/ops.rs b/encodings/sparse/src/ops.rs index 552dcf5fa6e..daee930a4b5 100644 --- a/encodings/sparse/src/ops.rs +++ b/encodings/sparse/src/ops.rs @@ -24,6 +24,8 @@ impl OperationsVTable for Sparse { #[cfg(test)] mod tests { + #![expect(deprecated)] + use vortex_array::IntoArray; use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; diff --git a/encodings/zigzag/src/array.rs b/encodings/zigzag/src/array.rs index 23e6f66f3eb..d91bf1f2974 100644 --- a/encodings/zigzag/src/array.rs +++ b/encodings/zigzag/src/array.rs @@ -271,6 +271,7 @@ impl ValidityChild for ZigZag { mod test { use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::scalar::Scalar; @@ -281,6 +282,7 @@ mod test { #[test] fn test_compute_statistics() -> VortexResult<()> { + #[expect(deprecated)] let array = buffer![1i32, -5i32, 2, 3, 4, 5, 6, 7, 8, 9, 10] .into_array() .to_primitive(); diff --git a/encodings/zigzag/src/compress.rs b/encodings/zigzag/src/compress.rs index 3c96c8f5778..8668ae6495f 100644 --- a/encodings/zigzag/src/compress.rs +++ b/encodings/zigzag/src/compress.rs @@ -78,6 +78,7 @@ where #[cfg(test)] mod test { use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::assert_arrays_eq; @@ -90,10 +91,9 @@ mod test { .unwrap() .into_array(); assert!(compressed.is::()); - assert_arrays_eq!( - compressed.to_primitive(), - PrimitiveArray::from_iter(-100_i8..100) - ); + #[expect(deprecated)] + let decompressed = compressed.to_primitive(); + assert_arrays_eq!(decompressed, PrimitiveArray::from_iter(-100_i8..100)); } #[test] fn test_compress_i16() { @@ -101,10 +101,9 @@ mod test { .unwrap() .into_array(); assert!(compressed.is::()); - assert_arrays_eq!( - compressed.to_primitive(), - PrimitiveArray::from_iter(-100_i16..100) - ); + #[expect(deprecated)] + let decompressed = compressed.to_primitive(); + assert_arrays_eq!(decompressed, PrimitiveArray::from_iter(-100_i16..100)); } #[test] fn test_compress_i32() { @@ -112,10 +111,9 @@ mod test { .unwrap() .into_array(); assert!(compressed.is::()); - assert_arrays_eq!( - compressed.to_primitive(), - PrimitiveArray::from_iter(-100_i32..100) - ); + #[expect(deprecated)] + let decompressed = compressed.to_primitive(); + assert_arrays_eq!(decompressed, PrimitiveArray::from_iter(-100_i32..100)); } #[test] fn test_compress_i64() { @@ -123,9 +121,8 @@ mod test { .unwrap() .into_array(); assert!(compressed.is::()); - assert_arrays_eq!( - compressed.to_primitive(), - PrimitiveArray::from_iter(-100_i64..100) - ); + #[expect(deprecated)] + let decompressed = compressed.to_primitive(); + assert_arrays_eq!(decompressed, PrimitiveArray::from_iter(-100_i64..100)); } } diff --git a/encodings/zigzag/src/compute/mod.rs b/encodings/zigzag/src/compute/mod.rs index 6aa5af1f532..4f2abcfca7a 100644 --- a/encodings/zigzag/src/compute/mod.rs +++ b/encodings/zigzag/src/compute/mod.rs @@ -70,6 +70,8 @@ impl ZigZagEncoded for u64 { #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; diff --git a/encodings/zstd/src/array.rs b/encodings/zstd/src/array.rs index 168f437c8cf..5e3d592acca 100644 --- a/encodings/zstd/src/array.rs +++ b/encodings/zstd/src/array.rs @@ -23,6 +23,7 @@ use vortex_array::ExecutionResult; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::Precision; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -370,7 +371,9 @@ fn collect_valid_primitive(parray: &PrimitiveArray) -> VortexResult VortexResult<(ByteBuffer, Vec)> { @@ -799,7 +802,9 @@ impl ZstdData { } pub fn from_array(array: ArrayRef, level: i32, values_per_frame: usize) -> VortexResult { - Self::from_canonical(&array.to_canonical()?, level, values_per_frame)? + #[expect(deprecated)] + let canonical = array.to_canonical()?; + Self::from_canonical(&canonical, level, values_per_frame)? .ok_or_else(|| vortex_err!("Zstd can only encode Primitive and VarBinView arrays")) } diff --git a/encodings/zstd/src/compute/cast.rs b/encodings/zstd/src/compute/cast.rs index 2beb94a1a4e..4ea6141af1a 100644 --- a/encodings/zstd/src/compute/cast.rs +++ b/encodings/zstd/src/compute/cast.rs @@ -86,6 +86,8 @@ impl CastReduce for Zstd { #[cfg(test)] mod tests { + #![expect(deprecated)] + use rstest::rstest; use vortex_array::IntoArray; use vortex_array::ToCanonical; diff --git a/encodings/zstd/src/test.rs b/encodings/zstd/src/test.rs index 84122db22c7..da467d3f2ed 100644 --- a/encodings/zstd/src/test.rs +++ b/encodings/zstd/src/test.rs @@ -4,6 +4,7 @@ use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -78,6 +79,7 @@ fn test_zstd_with_validity_and_multi_frame() { assert_nth_scalar!(compressed, 177, 177); let mut ctx = LEGACY_SESSION.create_execution_ctx(); + #[expect(deprecated)] let decompressed = Zstd::decompress(&compressed, &mut ctx) .unwrap() .to_primitive(); @@ -94,6 +96,7 @@ fn test_zstd_with_validity_and_multi_frame() { // check slicing works let slice = compressed.slice(176..179).unwrap(); + #[expect(deprecated)] let primitive = slice.to_primitive(); assert_eq!( i32::try_from( @@ -130,6 +133,7 @@ fn test_zstd_with_dict() { assert_nth_scalar!(compressed, 199, 199); let mut ctx = LEGACY_SESSION.create_execution_ctx(); + #[expect(deprecated)] let decompressed = Zstd::decompress(&compressed, &mut ctx) .unwrap() .to_primitive(); @@ -137,6 +141,7 @@ fn test_zstd_with_dict() { // check slicing works let slice = compressed.slice(176..179).unwrap(); + #[expect(deprecated)] let primitive = slice.to_primitive(); assert_arrays_eq!(primitive, PrimitiveArray::from_iter([176, 177, 178])); } @@ -213,6 +218,7 @@ fn test_zstd_decompress_var_bin_view() { assert_nth_scalar!(compressed, 4, "baz"); let mut ctx = LEGACY_SESSION.create_execution_ctx(); + #[expect(deprecated)] let decompressed = Zstd::decompress(&compressed, &mut ctx) .unwrap() .to_varbinview(); diff --git a/fuzz/fuzz_targets/file_io.rs b/fuzz/fuzz_targets/file_io.rs index 8d503c8c590..d4d3865507d 100644 --- a/fuzz/fuzz_targets/file_io.rs +++ b/fuzz/fuzz_targets/file_io.rs @@ -8,6 +8,7 @@ use libfuzzer_sys::Corpus; use libfuzzer_sys::fuzz_target; use vortex_array::Canonical; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::ChunkedArray; @@ -50,9 +51,9 @@ fuzz_target!(|fuzz: FuzzFileAction| -> Corpus { .clone() .apply(&filter_expr.clone().unwrap_or_else(|| lit(true))) .vortex_expect("filter expression evaluation should succeed in fuzz test"); - let mask = bool_mask - .to_bool() - .to_mask_fill_null_false(&mut SESSION.create_execution_ctx()); + #[expect(deprecated)] + let bool_mask_bool = bool_mask.to_bool(); + let mask = bool_mask_bool.to_mask_fill_null_false(&mut SESSION.create_execution_ctx()); let filtered = array_data .filter(mask) .vortex_expect("filter operation should succeed in fuzz test"); @@ -110,6 +111,7 @@ fuzz_target!(|fuzz: FuzzFileAction| -> Corpus { output_array.dtype() ); + #[expect(deprecated)] let bool_result = expected_array .binary(output_array.clone(), Operator::Eq) .vortex_expect("compare operation should succeed in fuzz test") diff --git a/fuzz/src/array/cast.rs b/fuzz/src/array/cast.rs index 503287c2dcf..fdb399bac43 100644 --- a/fuzz/src/array/cast.rs +++ b/fuzz/src/array/cast.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -34,21 +35,24 @@ pub fn cast_canonical_array(array: &ArrayRef, target: &DType) -> VortexResult() - .iter() - .map(|v| *v as Out) - .collect::>(), - Validity::from_mask( - array - .validity()? - .to_mask(array.len(), &mut LEGACY_SESSION.create_execution_ctx())?, - target.nullability(), - ), - ) - .into_array() + { + #[expect(deprecated)] + let prim = array.to_primitive(); + PrimitiveArray::new( + prim.as_slice::() + .iter() + .map(|v| *v as Out) + .collect::>(), + Validity::from_mask( + array.validity()?.to_mask( + array.len(), + &mut LEGACY_SESSION.create_execution_ctx(), + )?, + target.nullability(), + ), + ) + .into_array() + } }) } ))) @@ -64,31 +68,32 @@ pub fn cast_canonical_array(array: &ArrayRef, target: &DType) -> VortexResult Ok(Some( - PrimitiveArray::new( - array - .to_primitive() - .as_slice::() - .iter() - .map(|v| *v as f64) - .collect::>(), - Validity::from_mask( - array - .validity()? - .to_mask(array.len(), &mut LEGACY_SESSION.create_execution_ctx())?, - target.nullability(), - ), - ) - .into_array(), - )), - (PType::F64, PType::F32) => - { + (PType::F32, PType::F64) => { + #[expect(deprecated)] + let prim = array.to_primitive(); + Ok(Some( + PrimitiveArray::new( + prim.as_slice::() + .iter() + .map(|v| *v as f64) + .collect::>(), + Validity::from_mask( + array + .validity()? + .to_mask(array.len(), &mut LEGACY_SESSION.create_execution_ctx())?, + target.nullability(), + ), + ) + .into_array(), + )) + } + (PType::F64, PType::F32) => { + #[expect(deprecated)] + let prim = array.to_primitive(); #[expect(clippy::cast_possible_truncation)] Ok(Some( PrimitiveArray::new( - array - .to_primitive() - .as_slice::() + prim.as_slice::() .iter() .map(|v| *v as f32) .collect::>(), diff --git a/fuzz/src/array/compare.rs b/fuzz/src/array/compare.rs index 88784616eda..c45c25d4125 100644 --- a/fuzz/src/array/compare.rs +++ b/fuzz/src/array/compare.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -40,9 +41,10 @@ pub fn compare_canonical_array( .as_bool() .value() .vortex_expect("nulls handled before"); + #[expect(deprecated)] + let bool_array = array.to_bool(); compare_to( - array - .to_bool() + bool_array .to_bit_buffer() .iter() .zip( @@ -62,6 +64,7 @@ pub fn compare_canonical_array( } DType::Primitive(p, _) => { let primitive = value.as_primitive(); + #[expect(deprecated)] let primitive_array = array.to_primitive(); match_each_native_ptype!(p, |P| { let pval = primitive @@ -90,6 +93,7 @@ pub fn compare_canonical_array( } DType::Decimal(..) => { let decimal = value.as_decimal(); + #[expect(deprecated)] let decimal_array = array.to_decimal(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { let dval = decimal @@ -118,26 +122,34 @@ pub fn compare_canonical_array( ) }) } - DType::Utf8(_) => array.to_varbinview().with_iterator(|iter| { - let utf8_value = value.as_utf8(); - compare_to( - iter.map(|v| v.map(|b| unsafe { str::from_utf8_unchecked(b) })), - utf8_value.value().vortex_expect("nulls handled before"), - operator, - result_nullability, - ) - }), - DType::Binary(_) => array.to_varbinview().with_iterator(|iter| { - let binary_value = value.as_binary(); - compare_to( - // Don't understand the lifetime problem here but identity map makes it go away - #[expect(clippy::map_identity)] - iter.map(|v| v), - binary_value.value().vortex_expect("nulls handled before"), - operator, - result_nullability, - ) - }), + DType::Utf8(_) => { + #[expect(deprecated)] + let varbinview = array.to_varbinview(); + varbinview.with_iterator(|iter| { + let utf8_value = value.as_utf8(); + compare_to( + iter.map(|v| v.map(|b| unsafe { str::from_utf8_unchecked(b) })), + utf8_value.value().vortex_expect("nulls handled before"), + operator, + result_nullability, + ) + }) + } + DType::Binary(_) => { + #[expect(deprecated)] + let varbinview = array.to_varbinview(); + varbinview.with_iterator(|iter| { + let binary_value = value.as_binary(); + compare_to( + // Don't understand the lifetime problem here but identity map makes it go away + #[expect(clippy::map_identity)] + iter.map(|v| v), + binary_value.value().vortex_expect("nulls handled before"), + operator, + result_nullability, + ) + }) + } DType::Struct(..) | DType::List(..) | DType::FixedSizeList(..) => { let mut ctx = LEGACY_SESSION.create_execution_ctx(); let scalar_vals: Vec = (0..array.len()) diff --git a/fuzz/src/array/fill_null.rs b/fuzz/src/array/fill_null.rs index 4b4218cd73b..b9705147326 100644 --- a/fuzz/src/array/fill_null.rs +++ b/fuzz/src/array/fill_null.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -71,7 +72,9 @@ fn fill_bool_array( } Validity::AllInvalid => ConstantArray::new(fill_value.clone(), array.len()).into_array(), Validity::Array(validity_array) => { - let validity_bits = validity_array.to_bool().into_bit_buffer(); + #[expect(deprecated)] + let validity_bool = validity_array.to_bool(); + let validity_bits = validity_bool.into_bit_buffer(); let data_bits = array.into_bit_buffer(); let new_bits = match data_bits.try_into_mut() { @@ -116,6 +119,7 @@ fn fill_primitive_array( ConstantArray::new(fill_value.clone(), array.len()).into_array() } Validity::Array(validity_array) => { + #[expect(deprecated)] let validity_bool_array = validity_array.to_bool(); let validity_bits = validity_bool_array.to_bit_buffer(); let data_slice = array.as_slice::(); @@ -162,6 +166,7 @@ fn fill_decimal_array( ConstantArray::new(fill_value.clone(), array.len()).into_array() } Validity::Array(validity_array) => { + #[expect(deprecated)] let validity_bool_array = validity_array.to_bool(); let validity_bits = validity_bool_array.to_bit_buffer(); let data_buffer = array.buffer::(); @@ -196,6 +201,7 @@ fn fill_varbinview_array( Validity::NonNullable | Validity::AllValid => array.into_array(), Validity::AllInvalid => ConstantArray::new(fill_value.clone(), array.len()).into_array(), Validity::Array(validity_array) => { + #[expect(deprecated)] let validity_bool_array = validity_array.to_bool(); let validity_bits = validity_bool_array.to_bit_buffer(); @@ -223,9 +229,11 @@ fn fill_varbinview_array( let string_refs: Vec<&str> = strings.iter().map(|s| s.as_str()).collect(); let result = VarBinViewArray::from_iter_str(string_refs).into_array(); if result_nullability == Nullability::Nullable { + #[expect(deprecated)] + let result_vbv = result.to_varbinview(); VarBinViewArray::new_handle( - result.to_varbinview().views_handle().clone(), - Arc::clone(result.to_varbinview().data_buffers()), + result_vbv.views_handle().clone(), + Arc::clone(result_vbv.data_buffers()), result.dtype().as_nullable(), result_nullability.into(), ) @@ -257,9 +265,11 @@ fn fill_varbinview_array( let binary_refs: Vec<&[u8]> = binaries.iter().map(|b| b.as_slice()).collect(); let result = VarBinViewArray::from_iter_bin(binary_refs).into_array(); if result_nullability == Nullability::Nullable { + #[expect(deprecated)] + let result_vbv = result.to_varbinview(); VarBinViewArray::new_handle( - result.to_varbinview().views_handle().clone(), - Arc::clone(result.to_varbinview().data_buffers()), + result_vbv.views_handle().clone(), + Arc::clone(result_vbv.data_buffers()), result.dtype().as_nullable(), result_nullability.into(), ) diff --git a/fuzz/src/array/filter.rs b/fuzz/src/array/filter.rs index 9e5b90c7c05..c96d1044efe 100644 --- a/fuzz/src/array/filter.rs +++ b/fuzz/src/array/filter.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -43,6 +44,7 @@ pub fn filter_canonical_array(array: &ArrayRef, filter: &[bool]) -> VortexResult match array.dtype() { DType::Bool(_) => { + #[expect(deprecated)] let bool_array = array.to_bool(); Ok(BoolArray::new( BitBuffer::from_iter( @@ -57,6 +59,7 @@ pub fn filter_canonical_array(array: &ArrayRef, filter: &[bool]) -> VortexResult .into_array()) } DType::Primitive(p, _) => match_each_native_ptype!(p, |P| { + #[expect(deprecated)] let primitive_array = array.to_primitive(); Ok(PrimitiveArray::new( filter @@ -70,6 +73,7 @@ pub fn filter_canonical_array(array: &ArrayRef, filter: &[bool]) -> VortexResult .into_array()) }), DType::Decimal(d, _) => { + #[expect(deprecated)] let decimal_array = array.to_decimal(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { let buf = decimal_array.buffer::(); @@ -87,6 +91,7 @@ pub fn filter_canonical_array(array: &ArrayRef, filter: &[bool]) -> VortexResult }) } DType::Utf8(_) | DType::Binary(_) => { + #[expect(deprecated)] let utf8 = array.to_varbinview(); let values = utf8.with_iterator(|iter| { iter.zip(filter.iter()) @@ -97,6 +102,7 @@ pub fn filter_canonical_array(array: &ArrayRef, filter: &[bool]) -> VortexResult Ok(VarBinViewArray::from_iter(values, array.dtype().clone()).into_array()) } DType::Struct(..) => { + #[expect(deprecated)] let struct_array = array.to_struct(); let filtered_children = struct_array .iter_unmasked_fields() diff --git a/fuzz/src/array/mask.rs b/fuzz/src/array/mask.rs index 8f1aba4ed16..75cf60f6d9c 100644 --- a/fuzz/src/array/mask.rs +++ b/fuzz/src/array/mask.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -44,6 +45,7 @@ pub fn mask_validity(validity: &Validity, mask: &Mask) -> Validity { Validity::from_bit_buffer(make_valid.clone(), Nullability::Nullable) } Validity::Array(is_valid) => { + #[expect(deprecated)] let is_valid = is_valid.to_bool(); Validity::from_bit_buffer( is_valid.to_bit_buffer() & make_valid, diff --git a/fuzz/src/array/mod.rs b/fuzz/src/array/mod.rs index 2c72dbcc7e5..6dc126d9254 100644 --- a/fuzz/src/array/mod.rs +++ b/fuzz/src/array/mod.rs @@ -327,24 +327,22 @@ impl<'a> Arbitrary<'a> for FuzzArrayAction { } // Sum - returns a scalar, does NOT update current_array (terminal operation) - let sum_result = sum_canonical_array( - current_array - .to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - &mut ctx, - ) - .vortex_expect("sum_canonical_array should succeed in fuzz test"); + #[expect(deprecated)] + let current_array_canonical = current_array + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + let sum_result = sum_canonical_array(current_array_canonical, &mut ctx) + .vortex_expect("sum_canonical_array should succeed in fuzz test"); (Action::Sum, ExpectedValue::Scalar(sum_result)) } ActionType::MinMax => { // MinMax - returns a scalar, does NOT update current_array (terminal operation) - let min_max_result = min_max_canonical_array( - current_array - .to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - &mut ctx, - ) - .vortex_expect("min_max_canonical_array should succeed in fuzz test"); + #[expect(deprecated)] + let current_array_canonical = current_array + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + let min_max_result = min_max_canonical_array(current_array_canonical, &mut ctx) + .vortex_expect("min_max_canonical_array should succeed in fuzz test"); (Action::MinMax, ExpectedValue::MinMax(min_max_result)) } ActionType::FillNull => { @@ -370,13 +368,13 @@ impl<'a> Arbitrary<'a> for FuzzArrayAction { } // Compute expected result on canonical form - let expected_result = fill_null_canonical_array( - current_array - .to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - &fill_value, - ) - .vortex_expect("fill_null_canonical_array should succeed in fuzz test"); + #[expect(deprecated)] + let current_array_canonical = current_array + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + let expected_result = + fill_null_canonical_array(current_array_canonical, &fill_value) + .vortex_expect("fill_null_canonical_array should succeed in fuzz test"); // Update current_array to the result for chaining current_array = expected_result.clone(); ( @@ -391,10 +389,12 @@ impl<'a> Arbitrary<'a> for FuzzArrayAction { .collect::>>()?; // Compute expected result on canonical form + #[expect(deprecated)] + let current_array_canonical = current_array + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); let expected_result = mask_canonical_array( - current_array - .to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), + current_array_canonical, &Mask::from_iter(mask.clone()), ) .vortex_expect("mask_canonical_array should succeed in fuzz test"); @@ -424,13 +424,13 @@ impl<'a> Arbitrary<'a> for FuzzArrayAction { let expected_scalars: Vec = indices_vec .iter() .map(|&idx| { - scalar_at_canonical_array( - current_array - .to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - idx, + #[expect(deprecated)] + let canonical = current_array + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + scalar_at_canonical_array(canonical, idx).vortex_expect( + "scalar_at_canonical_array should succeed in fuzz test", ) - .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") }) .collect(); @@ -581,6 +581,7 @@ pub fn run_fuzz_action(fuzz_action: FuzzArrayAction) -> VortexFuzzResult { debug!(id = i, action = ?action); match action { Action::Compress(strategy) => { + #[expect(deprecated)] let canonical = current_array .to_canonical() .vortex_expect("to_canonical should succeed in fuzz test"); diff --git a/fuzz/src/array/scalar_at.rs b/fuzz/src/array/scalar_at.rs index 489860c7f59..fcc26c39b12 100644 --- a/fuzz/src/array/scalar_at.rs +++ b/fuzz/src/array/scalar_at.rs @@ -54,12 +54,12 @@ pub fn scalar_at_canonical_array(canonical: Canonical, index: usize) -> VortexRe let list = array.list_elements_at(index)?; let children: Vec = (0..list.len()) .map(|i| { - scalar_at_canonical_array( - list.to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - i, - ) - .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") + #[expect(deprecated)] + let canonical = list + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + scalar_at_canonical_array(canonical, i) + .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") }) .collect(); Scalar::list( @@ -72,12 +72,12 @@ pub fn scalar_at_canonical_array(canonical: Canonical, index: usize) -> VortexRe let list = array.fixed_size_list_elements_at(index)?; let children: Vec = (0..list.len()) .map(|i| { - scalar_at_canonical_array( - list.to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - i, - ) - .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") + #[expect(deprecated)] + let canonical = list + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + scalar_at_canonical_array(canonical, i) + .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") }) .collect(); Scalar::fixed_size_list(list.dtype().clone(), children, array.dtype().nullability()) @@ -86,20 +86,20 @@ pub fn scalar_at_canonical_array(canonical: Canonical, index: usize) -> VortexRe let field_scalars: Vec = array .iter_unmasked_fields() .map(|field| { - scalar_at_canonical_array( - field - .to_canonical() - .vortex_expect("to_canonical should succeed in fuzz test"), - index, - ) - .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") + #[expect(deprecated)] + let canonical = field + .to_canonical() + .vortex_expect("to_canonical should succeed in fuzz test"); + scalar_at_canonical_array(canonical, index) + .vortex_expect("scalar_at_canonical_array should succeed in fuzz test") }) .collect(); Scalar::struct_(array.dtype().clone(), field_scalars) } Canonical::Extension(array) => { - let storage_scalar = - scalar_at_canonical_array(array.storage_array().to_canonical()?, index)?; + #[expect(deprecated)] + let storage_canonical = array.storage_array().to_canonical()?; + let storage_scalar = scalar_at_canonical_array(storage_canonical, index)?; Scalar::extension_ref(array.ext_dtype().clone(), storage_scalar) } Canonical::Variant(_) => unreachable!("Variant arrays are not fuzzed"), diff --git a/fuzz/src/array/search_sorted.rs b/fuzz/src/array/search_sorted.rs index d7b9901cc90..f0de94db90a 100644 --- a/fuzz/src/array/search_sorted.rs +++ b/fuzz/src/array/search_sorted.rs @@ -6,6 +6,7 @@ use std::fmt::Debug; use vortex_array::ArrayRef; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -65,6 +66,7 @@ pub fn search_sorted_canonical_array( ) -> VortexResult { match array.dtype() { DType::Bool(_) => { + #[expect(deprecated)] let bool_array = array.to_bool(); let validity = bool_array .as_ref() @@ -84,6 +86,7 @@ pub fn search_sorted_canonical_array( SearchNullableSlice(opt_values).search_sorted(&Some(to_find), side) } DType::Primitive(p, _) => { + #[expect(deprecated)] let primitive_array = array.to_primitive(); let validity = primitive_array .as_ref() @@ -106,6 +109,7 @@ pub fn search_sorted_canonical_array( }) } DType::Decimal(d, _) => { + #[expect(deprecated)] let decimal_array = array.to_decimal(); let validity = decimal_array .as_ref() @@ -138,6 +142,7 @@ pub fn search_sorted_canonical_array( }) } DType::Utf8(_) | DType::Binary(_) => { + #[expect(deprecated)] let utf8 = array.to_varbinview(); let opt_values = utf8.with_iterator(|iter| iter.map(|v| v.map(|u| u.to_vec())).collect::>()); diff --git a/fuzz/src/array/slice.rs b/fuzz/src/array/slice.rs index e1e4c388e55..c131f70e9c4 100644 --- a/fuzz/src/array/slice.rs +++ b/fuzz/src/array/slice.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -41,11 +42,13 @@ pub fn slice_canonical_array( match array.dtype() { DType::Bool(_) => { + #[expect(deprecated)] let bool_array = array.to_bool(); let sliced_bools = bool_array.to_bit_buffer().slice(start..stop); Ok(BoolArray::new(sliced_bools, validity).into_array()) } DType::Primitive(p, _) => { + #[expect(deprecated)] let primitive_array = array.to_primitive(); match_each_native_ptype!(p, |P| { Ok(PrimitiveArray::new( @@ -56,6 +59,7 @@ pub fn slice_canonical_array( }) } DType::Utf8(_) | DType::Binary(_) => { + #[expect(deprecated)] let utf8 = array.to_varbinview(); let values = utf8.with_iterator(|iter| iter.map(|v| v.map(|u| u.to_vec())).collect::>()); @@ -66,6 +70,7 @@ pub fn slice_canonical_array( .into_array()) } DType::Struct(..) => { + #[expect(deprecated)] let struct_array = array.to_struct(); let sliced_children = struct_array .iter_unmasked_fields() @@ -80,6 +85,7 @@ pub fn slice_canonical_array( .map(|a| a.into_array()) } DType::List(..) => { + #[expect(deprecated)] let list_array = array.to_listview(); let offsets = slice_canonical_array(list_array.offsets(), start, stop)?; @@ -98,6 +104,7 @@ pub fn slice_canonical_array( .into_array()) } DType::FixedSizeList(..) => { + #[expect(deprecated)] let fsl_array = array.to_fixed_size_list(); let list_size = fsl_array.list_size() as usize; let elements = @@ -108,6 +115,7 @@ pub fn slice_canonical_array( .map(|a| a.into_array()) } DType::Decimal(decimal_dtype, _) => { + #[expect(deprecated)] let decimal_array = array.to_decimal(); Ok( match_each_decimal_value_type!(decimal_array.values_type(), |D| { diff --git a/fuzz/src/array/sort.rs b/fuzz/src/array/sort.rs index 12fb2c9ab0c..dbe9cff9179 100644 --- a/fuzz/src/array/sort.rs +++ b/fuzz/src/array/sort.rs @@ -6,6 +6,7 @@ use std::cmp::Ordering; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -26,6 +27,7 @@ use crate::array::take_canonical_array_non_nullable_indices; pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { match array.dtype() { DType::Bool(_) => { + #[expect(deprecated)] let bool_array = array.to_bool(); let mut opt_values = bool_array .to_bit_buffer() @@ -47,6 +49,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { Ok(BoolArray::from_iter(opt_values).into_array()) } DType::Primitive(p, _) => { + #[expect(deprecated)] let primitive_array = array.to_primitive(); match_each_native_ptype!(p, |P| { let mut opt_values = primitive_array @@ -71,6 +74,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { }) } DType::Decimal(d, _) => { + #[expect(deprecated)] let decimal_array = array.to_decimal(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { let buf = decimal_array.buffer::(); @@ -96,6 +100,7 @@ pub fn sort_canonical_array(array: &ArrayRef) -> VortexResult { }) } DType::Utf8(_) | DType::Binary(_) => { + #[expect(deprecated)] let utf8 = array.to_varbinview(); let mut opt_values = utf8.with_iterator(|iter| iter.map(|v| v.map(|u| u.to_vec())).collect::>()); diff --git a/fuzz/src/array/take.rs b/fuzz/src/array/take.rs index e737b33d0cc..d33dcdeaf2c 100644 --- a/fuzz/src/array/take.rs +++ b/fuzz/src/array/take.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -64,6 +65,7 @@ pub fn take_canonical_array(array: &ArrayRef, indices: &[Option]) -> Vort match array.dtype() { DType::Bool(_) => { + #[expect(deprecated)] let bool_array = array.to_bool(); let vec_values = bool_array.to_bit_buffer().iter().collect::>(); Ok(BoolArray::new( @@ -76,6 +78,7 @@ pub fn take_canonical_array(array: &ArrayRef, indices: &[Option]) -> Vort .into_array()) } DType::Primitive(p, _) => { + #[expect(deprecated)] let primitive_array = array.to_primitive(); match_each_native_ptype!(p, |P| { Ok(take_primitive::

( @@ -86,6 +89,7 @@ pub fn take_canonical_array(array: &ArrayRef, indices: &[Option]) -> Vort }) } DType::Decimal(d, _) => { + #[expect(deprecated)] let decimal_array = array.to_decimal(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { @@ -98,6 +102,7 @@ pub fn take_canonical_array(array: &ArrayRef, indices: &[Option]) -> Vort }) } DType::Utf8(_) | DType::Binary(_) => { + #[expect(deprecated)] let utf8 = array.to_varbinview(); let values = utf8.with_iterator(|iter| iter.map(|v| v.map(|u| u.to_vec())).collect::>()); @@ -110,6 +115,7 @@ pub fn take_canonical_array(array: &ArrayRef, indices: &[Option]) -> Vort .into_array()) } DType::Struct(..) => { + #[expect(deprecated)] let struct_array = array.to_struct(); let taken_children = struct_array .iter_unmasked_fields() diff --git a/fuzz/src/compress.rs b/fuzz/src/compress.rs index ab1d2cc38f9..59e2b2d7c88 100644 --- a/fuzz/src/compress.rs +++ b/fuzz/src/compress.rs @@ -71,6 +71,7 @@ pub fn run_compress_roundtrip(fuzz: FuzzCompressRoundtrip) -> crate::error::Vort let original_dtype = array.dtype().clone(); // Try to canonicalize - this is the main thing we're testing + #[expect(deprecated)] let canonical = match array.to_canonical() { Ok(c) => c, Err(e) => { diff --git a/vortex-array/benches/take_patches.rs b/vortex-array/benches/take_patches.rs index 0d9ff1ae05f..f929cbd3b69 100644 --- a/vortex-array/benches/take_patches.rs +++ b/vortex-array/benches/take_patches.rs @@ -38,7 +38,6 @@ const BENCH_ARGS: &[(f64, f64)] = &[ ]; #[divan::bench(args = BENCH_ARGS)] -#[expect(deprecated)] fn take_search(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { let mut rng = StdRng::seed_from_u64(0); let patches = fixture(65536, patches_sparsity, &mut rng); @@ -51,12 +50,13 @@ fn take_search(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) bencher .with_inputs(|| (&patches, &indices, LEGACY_SESSION.create_execution_ctx())) .bench_refs(|(patches, indices, ctx)| { - patches.take_search(indices.to_primitive(), false, ctx) + #[expect(deprecated)] + let prim = indices.to_primitive(); + patches.take_search(prim, false, ctx) }); } #[divan::bench(args = BENCH_ARGS)] -#[expect(deprecated)] fn take_search_chunked(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { let mut rng = StdRng::seed_from_u64(0); let patches = fixture_with_chunk_offsets(65536, patches_sparsity, &mut rng); @@ -69,12 +69,13 @@ fn take_search_chunked(bencher: Bencher, (patches_sparsity, index_multiple): (f6 bencher .with_inputs(|| (&patches, &indices, LEGACY_SESSION.create_execution_ctx())) .bench_refs(|(patches, indices, ctx)| { - patches.take_search(indices.to_primitive(), false, ctx) + #[expect(deprecated)] + let prim = indices.to_primitive(); + patches.take_search(prim, false, ctx) }); } #[divan::bench(args = BENCH_ARGS)] -#[expect(deprecated)] fn take_map(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { let mut rng = StdRng::seed_from_u64(0); let patches = fixture(65536, patches_sparsity, &mut rng); @@ -86,7 +87,11 @@ fn take_map(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) { bencher .with_inputs(|| (&patches, &indices, LEGACY_SESSION.create_execution_ctx())) - .bench_refs(|(patches, indices, ctx)| patches.take_map(indices.to_primitive(), false, ctx)); + .bench_refs(|(patches, indices, ctx)| { + #[expect(deprecated)] + let prim = indices.to_primitive(); + patches.take_map(prim, false, ctx) + }); } fn fixture(len: usize, sparsity: f64, rng: &mut StdRng) -> Patches { diff --git a/vortex-array/benches/varbinview_compact.rs b/vortex-array/benches/varbinview_compact.rs index 895289b1a0d..99243ce3606 100644 --- a/vortex-array/benches/varbinview_compact.rs +++ b/vortex-array/benches/varbinview_compact.rs @@ -38,7 +38,6 @@ fn compact_sliced(bencher: Bencher, args: (usize, usize)) { compact_sliced_impl(bencher, args); } -#[expect(deprecated)] fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)) { let base_size = (output_size * 100) / utilization_pct; let base_array = build_varbinview_fixture(base_size); @@ -47,6 +46,7 @@ fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize) .into_array() .take(indices) .vortex_expect("operation should succeed in benchmark"); + #[expect(deprecated)] let array = taken.to_varbinview(); bencher.with_inputs(|| &array).bench_refs(|array| { @@ -56,7 +56,6 @@ fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize) }) } -#[expect(deprecated)] fn compact_sliced_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)) { let base_size = (output_size * 100) / utilization_pct; let base_array = build_varbinview_fixture(base_size); @@ -64,6 +63,7 @@ fn compact_sliced_impl(bencher: Bencher, (output_size, utilization_pct): (usize, .into_array() .slice(0..output_size) .vortex_expect("slice should succeed"); + #[expect(deprecated)] let array = sliced.to_varbinview(); bencher.with_inputs(|| &array).bench_refs(|array| { diff --git a/vortex-array/src/array/erased.rs b/vortex-array/src/array/erased.rs index 654a389992e..84367076314 100644 --- a/vortex-array/src/array/erased.rs +++ b/vortex-array/src/array/erased.rs @@ -308,9 +308,10 @@ impl ArrayRef { /// Returns the canonical representation of the array. #[deprecated(note = "use `array.execute::(ctx)` instead")] - #[expect(deprecated)] pub fn to_canonical(&self) -> VortexResult { - self.clone().into_canonical() + #[expect(deprecated)] + let result = self.clone().into_canonical(); + result } /// Writes the array into the canonical builder. diff --git a/vortex-array/src/array/typed.rs b/vortex-array/src/array/typed.rs index 6b123afc268..49de1f7f17c 100644 --- a/vortex-array/src/array/typed.rs +++ b/vortex-array/src/array/typed.rs @@ -394,9 +394,10 @@ impl Array { } #[deprecated(note = "Use Array::::execute::() instead")] - #[expect(deprecated)] pub fn to_canonical(&self) -> VortexResult { - self.inner.to_canonical() + #[expect(deprecated)] + let result = self.inner.to_canonical(); + result } pub fn nbytes(&self) -> u64 { diff --git a/vortex-array/src/arrays/arbitrary.rs b/vortex-array/src/arrays/arbitrary.rs index 6742eb4ff74..fc5919d3e9b 100644 --- a/vortex-array/src/arrays/arbitrary.rs +++ b/vortex-array/src/arrays/arbitrary.rs @@ -84,7 +84,6 @@ fn random_array(u: &mut Unstructured, dtype: &DType, len: Option) -> Resu } /// Creates a random array chunk. -#[expect(deprecated)] fn random_array_chunk( u: &mut Unstructured<'_>, dtype: &DType, @@ -107,10 +106,14 @@ fn random_array_chunk( PType::I16 => random_primitive::(u, *n, chunk_len), PType::I32 => random_primitive::(u, *n, chunk_len), PType::I64 => random_primitive::(u, *n, chunk_len), - PType::F16 => Ok(random_primitive::(u, *n, chunk_len)? - .to_primitive() - .reinterpret_cast(PType::F16) - .into_array()), + PType::F16 => { + #[expect(deprecated)] + let prim = random_primitive::(u, *n, chunk_len)? + .to_primitive() + .reinterpret_cast(PType::F16) + .into_array(); + Ok(prim) + } PType::F32 => random_primitive::(u, *n, chunk_len), PType::F64 => random_primitive::(u, *n, chunk_len), }, diff --git a/vortex-array/src/arrays/bool/compute/take.rs b/vortex-array/src/arrays/bool/compute/take.rs index 4406c50a94a..f7129d08366 100644 --- a/vortex-array/src/arrays/bool/compute/take.rs +++ b/vortex-array/src/arrays/bool/compute/take.rs @@ -94,7 +94,6 @@ mod test { use crate::validity::Validity; #[test] - #[expect(deprecated)] fn take_nullable() { let reference = BoolArray::from_iter(vec![ Some(false), @@ -104,6 +103,7 @@ mod test { Some(false), ]); + #[expect(deprecated)] let b = reference .take(buffer![0, 3, 4].into_array()) .unwrap() diff --git a/vortex-array/src/arrays/bool/vtable/operations.rs b/vortex-array/src/arrays/bool/vtable/operations.rs index 2a136880c33..11147b810b2 100644 --- a/vortex-array/src/arrays/bool/vtable/operations.rs +++ b/vortex-array/src/arrays/bool/vtable/operations.rs @@ -35,9 +35,9 @@ mod tests { use crate::assert_arrays_eq; #[test] - #[expect(deprecated)] fn test_slice_hundred_elements() { let arr = BoolArray::from_iter(iter::repeat_n(Some(true), 100)); + #[expect(deprecated)] let sliced_arr = arr.into_array().slice(8..16).unwrap().to_bool(); assert_eq!(sliced_arr.len(), 8); assert_eq!(sliced_arr.to_bit_buffer().len(), 8); @@ -45,9 +45,9 @@ mod tests { } #[test] - #[expect(deprecated)] fn test_slice() { let arr = BoolArray::from_iter([Some(true), Some(true), None, Some(false), None]); + #[expect(deprecated)] let sliced_arr = arr.into_array().slice(1..4).unwrap().to_bool(); assert_arrays_eq!( diff --git a/vortex-array/src/arrays/chunked/array.rs b/vortex-array/src/arrays/chunked/array.rs index 8bc34cc74c7..78d0c4caa52 100644 --- a/vortex-array/src/arrays/chunked/array.rs +++ b/vortex-array/src/arrays/chunked/array.rs @@ -179,7 +179,6 @@ impl Array { }) } - #[expect(deprecated)] pub fn rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> VortexResult { let mut new_chunks = Vec::new(); let mut chunks_to_combine = Vec::new(); @@ -193,14 +192,14 @@ impl Array { || new_chunk_n_elements + n_elements > target_rowsize) && !chunks_to_combine.is_empty() { - new_chunks.push( - unsafe { - Array::::new_unchecked(chunks_to_combine, self.dtype().clone()) - } - .into_array() - .to_canonical()? - .into_array(), - ); + #[expect(deprecated)] + let canonical = unsafe { + Array::::new_unchecked(chunks_to_combine, self.dtype().clone()) + } + .into_array() + .to_canonical()? + .into_array(); + new_chunks.push(canonical); new_chunk_n_bytes = 0; new_chunk_n_elements = 0; @@ -217,12 +216,13 @@ impl Array { } if !chunks_to_combine.is_empty() { - new_chunks.push( + #[expect(deprecated)] + let canonical = unsafe { Array::::new_unchecked(chunks_to_combine, self.dtype().clone()) } .into_array() .to_canonical()? - .into_array(), - ); + .into_array(); + new_chunks.push(canonical); } unsafe { Ok(Self::new_unchecked(new_chunks, self.dtype().clone())) } diff --git a/vortex-array/src/arrays/chunked/compute/take.rs b/vortex-array/src/arrays/chunked/compute/take.rs index 06df02383f9..afa400de612 100644 --- a/vortex-array/src/arrays/chunked/compute/take.rs +++ b/vortex-array/src/arrays/chunked/compute/take.rs @@ -255,7 +255,6 @@ mod test { } #[test] - #[expect(deprecated)] fn test_take_shuffled_large() -> VortexResult<()> { let nchunks: i32 = 100; let chunk_len: i32 = 1_000; @@ -286,6 +285,7 @@ mod test { let result = arr.take(indices_arr.into_array())?; // Verify every element. + #[expect(deprecated)] let result = result.to_primitive(); let result_vals = result.as_slice::(); for (pos, &idx) in indices.iter().enumerate() { diff --git a/vortex-array/src/arrays/chunked/compute/zip.rs b/vortex-array/src/arrays/chunked/compute/zip.rs index c3ce79cc479..1d7873888a3 100644 --- a/vortex-array/src/arrays/chunked/compute/zip.rs +++ b/vortex-array/src/arrays/chunked/compute/zip.rs @@ -64,7 +64,6 @@ mod tests { use crate::dtype::PType; #[test] - #[expect(deprecated)] fn test_chunked_zip_aligns_across_boundaries() { let if_true = ChunkedArray::try_new( vec![ @@ -104,6 +103,7 @@ mod tests { assert_eq!(zipped.nchunks(), 4); let mut values: Vec = Vec::new(); for chunk in zipped.chunks() { + #[expect(deprecated)] let primitive = chunk.to_primitive(); values.extend_from_slice(primitive.as_slice::()); } diff --git a/vortex-array/src/arrays/chunked/paired_chunks.rs b/vortex-array/src/arrays/chunked/paired_chunks.rs index 9287735d76a..2145c88dbbd 100644 --- a/vortex-array/src/arrays/chunked/paired_chunks.rs +++ b/vortex-array/src/arrays/chunked/paired_chunks.rs @@ -134,7 +134,6 @@ mod tests { } #[expect(clippy::type_complexity)] - #[expect(deprecated)] fn collect_pairs( left: &ChunkedArray, right: &ChunkedArray, @@ -142,7 +141,9 @@ mod tests { let mut result = Vec::new(); for pair in left.paired_chunks(right) { let pair = pair?; + #[expect(deprecated)] let l: Vec = pair.left.to_primitive().as_slice::().to_vec(); + #[expect(deprecated)] let r: Vec = pair.right.to_primitive().as_slice::().to_vec(); result.push((l, r, pair.pos)); } diff --git a/vortex-array/src/arrays/chunked/tests.rs b/vortex-array/src/arrays/chunked/tests.rs index f452d0c1758..6cc2049ec64 100644 --- a/vortex-array/src/arrays/chunked/tests.rs +++ b/vortex-array/src/arrays/chunked/tests.rs @@ -172,7 +172,6 @@ fn scalar_at_empty_children_leading() { } #[test] -#[expect(deprecated)] pub fn pack_nested_structs() { let struct_array = StructArray::try_new( ["a"].into(), @@ -192,8 +191,11 @@ pub fn pack_nested_structs() { ) .unwrap() .into_array(); + #[expect(deprecated)] let canonical_struct = chunked.to_struct(); + #[expect(deprecated)] let canonical_varbin = canonical_struct.unmasked_fields()[0].to_varbinview(); + #[expect(deprecated)] let original_varbin = struct_array.unmasked_fields()[0].to_varbinview(); let orig_values = original_varbin.with_iterator(|it| it.map(|a| a.map(|v| v.to_vec())).collect::>()); @@ -203,7 +205,6 @@ pub fn pack_nested_structs() { } #[test] -#[expect(deprecated)] pub fn pack_nested_lists() { let l1 = ListArray::try_new( buffer![1, 2, 3, 4].into_array(), @@ -227,6 +228,7 @@ pub fn pack_nested_lists() { ), ); + #[expect(deprecated)] let canon_values = chunked_list.unwrap().as_array().to_listview(); assert_eq!( diff --git a/vortex-array/src/arrays/chunked/vtable/canonical.rs b/vortex-array/src/arrays/chunked/vtable/canonical.rs index 2e14b00bb0d..1e32f7295bc 100644 --- a/vortex-array/src/arrays/chunked/vtable/canonical.rs +++ b/vortex-array/src/arrays/chunked/vtable/canonical.rs @@ -256,7 +256,6 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn pack_nested_structs() { let struct_array = StructArray::try_new( ["a"].into(), @@ -276,8 +275,11 @@ mod tests { ) .unwrap() .into_array(); + #[expect(deprecated)] let canonical_struct = chunked.to_struct(); + #[expect(deprecated)] let canonical_varbin = canonical_struct.unmasked_field(0).to_varbinview(); + #[expect(deprecated)] let original_varbin = struct_array.unmasked_field(0).to_varbinview(); let orig_values = original_varbin .with_iterator(|it| it.map(|a| a.map(|v| v.to_vec())).collect::>()); @@ -287,7 +289,6 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn pack_nested_lists() { let l1 = ListArray::try_new( buffer![1, 2, 3, 4].into_array(), @@ -308,6 +309,7 @@ mod tests { List(Arc::new(Primitive(I32, NonNullable)), NonNullable), ); + #[expect(deprecated)] let canon_values = chunked_list.unwrap().as_array().to_listview(); assert_eq!( diff --git a/vortex-array/src/arrays/chunked/vtable/mod.rs b/vortex-array/src/arrays/chunked/vtable/mod.rs index 3ee71433a12..5e9c4a4d817 100644 --- a/vortex-array/src/arrays/chunked/vtable/mod.rs +++ b/vortex-array/src/arrays/chunked/vtable/mod.rs @@ -162,7 +162,6 @@ impl VTable for Chunked { Ok(Some(vec![])) } - #[expect(deprecated)] fn deserialize( &self, dtype: &DType, @@ -188,6 +187,7 @@ impl VTable for Chunked { &DType::Primitive(PType::U64, Nullability::NonNullable), nchunks + 1, )?; + #[expect(deprecated)] let chunk_offsets_buf = chunk_offsets.to_primitive().to_buffer::(); let chunk_offsets_usize = chunk_offsets_buf .iter() diff --git a/vortex-array/src/arrays/constant/compute/take.rs b/vortex-array/src/arrays/constant/compute/take.rs index 8fc8976599b..15e67a02929 100644 --- a/vortex-array/src/arrays/constant/compute/take.rs +++ b/vortex-array/src/arrays/constant/compute/take.rs @@ -83,7 +83,6 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; - #[expect(deprecated)] #[test] fn take_nullable_indices() { let array = ConstantArray::new(42, 10).into_array(); @@ -102,6 +101,7 @@ mod tests { taken.dtype() ); assert_arrays_eq!( + #[expect(deprecated)] taken.to_primitive(), PrimitiveArray::new( buffer![42i32, 42, 42], @@ -119,7 +119,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn take_all_valid_indices() { let array = ConstantArray::new(42, 10).into_array(); @@ -131,6 +130,7 @@ mod tests { taken.dtype() ); assert_arrays_eq!( + #[expect(deprecated)] taken.to_primitive(), PrimitiveArray::new(buffer![42i32, 42, 42], Validity::AllValid) ); diff --git a/vortex-array/src/arrays/constant/vtable/canonical.rs b/vortex-array/src/arrays/constant/vtable/canonical.rs index b53858c71e3..8d4955c2261 100644 --- a/vortex-array/src/arrays/constant/vtable/canonical.rs +++ b/vortex-array/src/arrays/constant/vtable/canonical.rs @@ -344,10 +344,10 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; - #[expect(deprecated)] #[test] fn test_canonicalize_null() { let const_null = ConstantArray::new(Scalar::null(DType::Null), 42); + #[expect(deprecated)] let actual = const_null.as_array().to_null(); assert_eq!(actual.len(), 42); assert_eq!( @@ -366,7 +366,6 @@ mod tests { assert_arrays_eq!(const_array, expected); } - #[expect(deprecated)] #[test] fn test_canonicalize_propagates_stats() -> VortexResult<()> { let scalar = Scalar::bool(true, Nullability::NonNullable); @@ -378,6 +377,7 @@ mod tests { &mut LEGACY_SESSION.create_execution_ctx(), ) .unwrap(); + #[expect(deprecated)] let canonical = const_array.to_canonical()?.into_array(); let canonical_stats = canonical.statistics(); @@ -396,7 +396,6 @@ mod tests { Ok(()) } - #[expect(deprecated)] #[test] fn test_canonicalize_scalar_values() { let f16_value = f16::from_f32(5.722046e-6); @@ -404,6 +403,7 @@ mod tests { // Create a ConstantArray with the f16 scalar let const_array = ConstantArray::new(f16_scalar.clone(), 1).into_array(); + #[expect(deprecated)] let canonical_const = const_array.to_primitive(); // Verify the scalar value is preserved through canonicalization @@ -415,7 +415,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_canonicalize_lists() -> VortexResult<()> { let list_scalar = Scalar::list( @@ -424,24 +423,27 @@ mod tests { Nullability::NonNullable, ); let const_array = ConstantArray::new(list_scalar, 2).into_array(); + #[expect(deprecated)] let canonical_const = const_array.to_listview(); let list_array = canonical_const.rebuild(ListViewRebuildMode::MakeZeroCopyToList)?; assert_arrays_eq!( + #[expect(deprecated)] list_array.elements().to_primitive(), PrimitiveArray::from_iter([1u64, 2, 1, 2]) ); assert_arrays_eq!( + #[expect(deprecated)] list_array.offsets().to_primitive(), PrimitiveArray::from_iter([0u64, 2]) ); assert_arrays_eq!( + #[expect(deprecated)] list_array.sizes().to_primitive(), PrimitiveArray::from_iter([2u64, 2]) ); Ok(()) } - #[expect(deprecated)] #[test] fn test_canonicalize_empty_list() { let list_scalar = Scalar::list( @@ -450,19 +452,23 @@ mod tests { Nullability::NonNullable, ); let const_array = ConstantArray::new(list_scalar, 2).into_array(); + #[expect(deprecated)] let canonical_const = const_array.to_listview(); - assert!(canonical_const.elements().to_primitive().is_empty()); + #[expect(deprecated)] + let elements_prim = canonical_const.elements().to_primitive(); + assert!(elements_prim.is_empty()); assert_arrays_eq!( + #[expect(deprecated)] canonical_const.offsets().to_primitive(), PrimitiveArray::from_iter([0u64, 0]) ); assert_arrays_eq!( + #[expect(deprecated)] canonical_const.sizes().to_primitive(), PrimitiveArray::from_iter([0u64, 0]) ); } - #[expect(deprecated)] #[test] fn test_canonicalize_null_list() { let list_scalar = Scalar::null(DType::List( @@ -470,19 +476,23 @@ mod tests { Nullability::Nullable, )); let const_array = ConstantArray::new(list_scalar, 2).into_array(); + #[expect(deprecated)] let canonical_const = const_array.to_listview(); - assert!(canonical_const.elements().to_primitive().is_empty()); + #[expect(deprecated)] + let elements_prim = canonical_const.elements().to_primitive(); + assert!(elements_prim.is_empty()); assert_arrays_eq!( + #[expect(deprecated)] canonical_const.offsets().to_primitive(), PrimitiveArray::from_iter([0u64, 0]) ); assert_arrays_eq!( + #[expect(deprecated)] canonical_const.sizes().to_primitive(), PrimitiveArray::from_iter([0u64, 0]) ); } - #[expect(deprecated)] #[test] fn test_canonicalize_nullable_struct() { let array = ConstantArray::new( @@ -496,6 +506,7 @@ mod tests { 3, ); + #[expect(deprecated)] let struct_array = array.as_array().to_struct(); assert_eq!(struct_array.len(), 3); assert_eq!( @@ -515,7 +526,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_non_null() { // Test with a non-null fixed-size list constant. @@ -530,6 +540,7 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 4).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 4); @@ -539,12 +550,12 @@ mod tests { // Check that each list is [10, 20, 30]. for i in 0..4 { let list = canonical.fixed_size_list_elements_at(i).unwrap(); + #[expect(deprecated)] let list_primitive = list.to_primitive(); assert_arrays_eq!(list_primitive, PrimitiveArray::from_iter([10i32, 20, 30])); } } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_nullable() { // Test with a nullable but non-null fixed-size list constant. @@ -558,6 +569,7 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 3).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 3); @@ -565,6 +577,7 @@ mod tests { assert!(matches!(canonical.validity(), Ok(Validity::AllValid))); // Check elements. + #[expect(deprecated)] let elements = canonical.elements().to_primitive(); assert_arrays_eq!( elements, @@ -572,7 +585,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_null() { // Test with a null fixed-size list constant. @@ -583,6 +595,7 @@ mod tests { )); let const_array = ConstantArray::new(fsl_scalar, 5).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 5); @@ -590,12 +603,12 @@ mod tests { assert!(matches!(canonical.validity(), Ok(Validity::AllInvalid))); // Elements should be defaults (zeros). + #[expect(deprecated)] let elements = canonical.elements().to_primitive(); assert_eq!(elements.len(), 20); // 5 lists * 4 elements each assert!(elements.as_slice::().iter().all(|&x| x == 0)); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_empty() { // Test with size-0 lists (edge case). @@ -606,6 +619,7 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 10).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 10); @@ -616,7 +630,6 @@ mod tests { assert!(canonical.elements().is_empty()); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_nested() { // Test with nested data types (list of strings). @@ -627,12 +640,14 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 2).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 2); assert_eq!(canonical.list_size(), 2); // Check elements are repeated correctly. + #[expect(deprecated)] let elements = canonical.elements().to_varbinview(); assert_eq!( elements @@ -660,7 +675,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_single_element() { // Test with a single-element list. @@ -671,16 +685,17 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 1).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 1); assert_eq!(canonical.list_size(), 1); + #[expect(deprecated)] let elements = canonical.elements().to_primitive(); assert_arrays_eq!(elements, PrimitiveArray::from_iter([42i16])); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_with_null_elements() { // Test FSL with nullable element type where some elements are null. @@ -695,6 +710,7 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 3).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 3); @@ -702,6 +718,7 @@ mod tests { assert!(matches!(canonical.validity(), Ok(Validity::NonNullable))); // Check elements including nulls. + #[expect(deprecated)] let elements = canonical.elements().to_primitive(); assert_eq!( elements @@ -736,7 +753,6 @@ mod tests { assert!(element_validity.is_valid(5).unwrap()); } - #[expect(deprecated)] #[test] fn test_canonicalize_fixed_size_list_large() { // Test with a large constant array. @@ -753,11 +769,13 @@ mod tests { ); let const_array = ConstantArray::new(fsl_scalar, 1000).into_array(); + #[expect(deprecated)] let canonical = const_array.to_fixed_size_list(); assert_eq!(canonical.len(), 1000); assert_eq!(canonical.list_size(), 5); + #[expect(deprecated)] let elements = canonical.elements().to_primitive(); assert_eq!(elements.len(), 5000); diff --git a/vortex-array/src/arrays/decimal/compute/cast.rs b/vortex-array/src/arrays/decimal/compute/cast.rs index a505ff12b7e..80155954214 100644 --- a/vortex-array/src/arrays/decimal/compute/cast.rs +++ b/vortex-array/src/arrays/decimal/compute/cast.rs @@ -159,7 +159,6 @@ mod tests { use crate::dtype::Nullability; use crate::validity::Validity; - #[expect(deprecated)] #[test] fn cast_decimal_to_nullable() { let decimal_dtype = DecimalDType::new(10, 2); @@ -171,6 +170,7 @@ mod tests { // Cast to nullable let nullable_dtype = DType::Decimal(decimal_dtype, Nullability::Nullable); + #[expect(deprecated)] let casted = array .into_array() .cast(nullable_dtype.clone()) @@ -182,7 +182,6 @@ mod tests { assert_eq!(casted.len(), 3); } - #[expect(deprecated)] #[test] fn cast_nullable_to_non_nullable() { let decimal_dtype = DecimalDType::new(10, 2); @@ -192,6 +191,7 @@ mod tests { // Cast to non-nullable let non_nullable_dtype = DType::Decimal(decimal_dtype, Nullability::NonNullable); + #[expect(deprecated)] let casted = array .into_array() .cast(non_nullable_dtype.clone()) @@ -202,7 +202,6 @@ mod tests { assert!(matches!(casted.validity(), Ok(Validity::NonNullable))); } - #[expect(deprecated)] #[test] #[should_panic(expected = "Cannot cast array with invalid values to non-nullable type")] fn cast_nullable_with_nulls_to_non_nullable_fails() { @@ -213,14 +212,14 @@ mod tests { // Attempt to cast to non-nullable should fail let non_nullable_dtype = DType::Decimal(decimal_dtype, Nullability::NonNullable); - array + #[expect(deprecated)] + let result = array .into_array() .cast(non_nullable_dtype) - .and_then(|a| a.to_canonical().map(|c| c.into_array())) - .unwrap(); + .and_then(|a| a.to_canonical().map(|c| c.into_array())); + result.unwrap(); } - #[expect(deprecated)] #[test] fn cast_different_scale_fails() { let array = DecimalArray::new( @@ -231,6 +230,7 @@ mod tests { // Try to cast to different scale - not supported let different_dtype = DType::Decimal(DecimalDType::new(15, 3), Nullability::NonNullable); + #[expect(deprecated)] let result = array .into_array() .cast(different_dtype) @@ -245,7 +245,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn cast_downcast_precision_fails() { let array = DecimalArray::new( @@ -256,6 +255,7 @@ mod tests { // Try to downcast precision - not supported let smaller_dtype = DType::Decimal(DecimalDType::new(10, 2), Nullability::NonNullable); + #[expect(deprecated)] let result = array .into_array() .cast(smaller_dtype) @@ -270,7 +270,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn cast_upcast_precision_succeeds() { let array = DecimalArray::new( @@ -281,6 +280,7 @@ mod tests { // Cast to higher precision with same scale - should succeed let wider_dtype = DType::Decimal(DecimalDType::new(38, 2), Nullability::NonNullable); + #[expect(deprecated)] let casted = array.into_array().cast(wider_dtype).unwrap().to_decimal(); assert_eq!(casted.precision(), 38); @@ -290,7 +290,6 @@ mod tests { assert_eq!(casted.values_type(), DecimalType::I128); } - #[expect(deprecated)] #[test] fn cast_to_non_decimal_returns_err() { let array = DecimalArray::new( @@ -300,6 +299,7 @@ mod tests { ); // Try to cast to non-decimal type - should fail since no kernel can handle it + #[expect(deprecated)] let result = array .into_array() .cast(DType::Utf8(Nullability::NonNullable)) diff --git a/vortex-array/src/arrays/decimal/compute/fill_null.rs b/vortex-array/src/arrays/decimal/compute/fill_null.rs index e5dedf7d3bd..684e5aa61e4 100644 --- a/vortex-array/src/arrays/decimal/compute/fill_null.rs +++ b/vortex-array/src/arrays/decimal/compute/fill_null.rs @@ -102,7 +102,6 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; - #[expect(deprecated)] #[test] fn fill_null_leading_none() { let decimal_dtype = DecimalDType::new(19, 2); @@ -110,6 +109,7 @@ mod tests { [None, Some(800i128), None, Some(1000i128), None], decimal_dtype, ); + #[expect(deprecated)] let p = arr .into_array() .fill_null(Scalar::decimal( @@ -137,7 +137,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn fill_null_all_none() { let decimal_dtype = DecimalDType::new(19, 2); @@ -147,6 +146,7 @@ mod tests { decimal_dtype, ); + #[expect(deprecated)] let p = arr .into_array() .fill_null(Scalar::decimal( @@ -163,12 +163,12 @@ mod tests { } /// fill_null with a value that overflows the array's storage type should upcast the array. - #[expect(deprecated)] #[test] fn fill_null_overflow_upcasts() { let decimal_dtype = DecimalDType::new(3, 0); let arr = DecimalArray::from_option_iter([None, Some(10i8), None], decimal_dtype); // i8 max is 127, so 200 doesn't fit — the array should be widened to i16. + #[expect(deprecated)] let result = arr .into_array() .fill_null(Scalar::decimal( @@ -184,7 +184,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn fill_null_non_nullable() { let decimal_dtype = DecimalDType::new(19, 2); @@ -194,6 +193,7 @@ mod tests { decimal_dtype, Validity::NonNullable, ); + #[expect(deprecated)] let p = arr .into_array() .fill_null(Scalar::decimal( diff --git a/vortex-array/src/arrays/dict/array.rs b/vortex-array/src/arrays/dict/array.rs index e2a91ac187c..f1f6db96f72 100644 --- a/vortex-array/src/arrays/dict/array.rs +++ b/vortex-array/src/arrays/dict/array.rs @@ -141,12 +141,12 @@ pub trait DictArrayExt: TypedArrayRef + DictArraySlotsExt { Ok(()) } - #[expect(deprecated)] fn compute_referenced_values_mask(&self, referenced: bool) -> VortexResult { let codes = self.codes(); let codes_validity = codes .validity()? .to_mask(codes.len(), &mut LEGACY_SESSION.create_execution_ctx())?; + #[expect(deprecated)] let codes_primitive = self.codes().to_primitive(); let values_len = self.values().len(); @@ -424,7 +424,6 @@ mod test { .into_array() } - #[expect(deprecated)] #[test] fn test_dict_array_from_primitive_chunks() -> VortexResult<()> { let len = 2; @@ -437,6 +436,7 @@ mod test { ); array.append_to_builder(builder.as_mut(), &mut LEGACY_SESSION.create_execution_ctx())?; + #[expect(deprecated)] let into_prim = array.to_primitive(); let prim_into = builder.finish_into_canonical().into_primitive(); diff --git a/vortex-array/src/arrays/dict/compute/cast.rs b/vortex-array/src/arrays/dict/compute/cast.rs index 065db89534f..c9575c32ae2 100644 --- a/vortex-array/src/arrays/dict/compute/cast.rs +++ b/vortex-array/src/arrays/dict/compute/cast.rs @@ -70,7 +70,6 @@ mod tests { use crate::dtype::Nullability; use crate::dtype::PType; - #[expect(deprecated)] #[test] fn test_cast_dict_to_wider_type() { let values = buffer![1i32, 2, 3, 2, 1].into_array(); @@ -85,6 +84,7 @@ mod tests { &DType::Primitive(PType::I64, Nullability::NonNullable) ); + #[expect(deprecated)] let decoded = casted.to_primitive(); assert_arrays_eq!(decoded, PrimitiveArray::from_iter([1i64, 2, 3, 2, 1])); } @@ -105,7 +105,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_cast_dict_allvalid_to_nonnullable_and_back() { // Create an AllValid dict array (no nulls) @@ -171,7 +170,9 @@ mod tests { ); // Verify values are unchanged + #[expect(deprecated)] let original_values = dict.as_array().to_primitive(); + #[expect(deprecated)] let final_values = back_to_non_nullable.to_primitive(); assert_arrays_eq!(original_values, final_values); } @@ -185,7 +186,6 @@ mod tests { test_cast_conformance(&array); } - #[expect(deprecated)] #[test] fn test_cast_dict_with_unreferenced_null_values_to_nonnullable() { use crate::arrays::DictArray; @@ -221,9 +221,8 @@ mod tests { casted.dtype(), &DType::Primitive(PType::F64, Nullability::NonNullable) ); - assert_arrays_eq!( - casted.to_primitive(), - PrimitiveArray::from_iter([1.0f64, 3.0, 1.0]) - ); + #[expect(deprecated)] + let casted_prim = casted.to_primitive(); + assert_arrays_eq!(casted_prim, PrimitiveArray::from_iter([1.0f64, 3.0, 1.0])); } } diff --git a/vortex-array/src/arrays/dict/compute/fill_null.rs b/vortex-array/src/arrays/dict/compute/fill_null.rs index 911cb3eded5..189d8240050 100644 --- a/vortex-array/src/arrays/dict/compute/fill_null.rs +++ b/vortex-array/src/arrays/dict/compute/fill_null.rs @@ -106,7 +106,6 @@ mod tests { use crate::scalar::Scalar; use crate::validity::Validity; - #[expect(deprecated)] #[test] fn nullable_codes_fill_in_values() { let dict = DictArray::try_new( @@ -123,6 +122,7 @@ mod tests { .into_array() .fill_null(Scalar::primitive(20, Nullability::NonNullable)) .vortex_expect("operation should succeed in test"); + #[expect(deprecated)] let filled_primitive = filled.to_primitive(); assert_arrays_eq!(filled_primitive, PrimitiveArray::from_iter([10, 20, 20])); assert!( diff --git a/vortex-array/src/arrays/dict/compute/mod.rs b/vortex-array/src/arrays/dict/compute/mod.rs index 2af3bf2e14d..c56cc8ef367 100644 --- a/vortex-array/src/arrays/dict/compute/mod.rs +++ b/vortex-array/src/arrays/dict/compute/mod.rs @@ -77,7 +77,6 @@ mod test { use crate::dtype::Nullability; use crate::dtype::PType::I32; use crate::scalar_fn::fns::operators::Operator; - #[expect(deprecated)] #[test] fn canonicalise_nullable_primitive() { let values: Vec> = (0..65) @@ -91,6 +90,7 @@ mod test { let dict = dict_encode(&PrimitiveArray::from_option_iter(values.clone()).into_array()).unwrap(); + #[expect(deprecated)] let actual = dict.as_array().to_primitive(); let expected = PrimitiveArray::from_option_iter(values); @@ -98,31 +98,30 @@ mod test { assert_arrays_eq!(actual, expected); } - #[expect(deprecated)] #[test] fn canonicalise_non_nullable_primitive_32_unique_values() { let unique_values: Vec = (0..32).collect(); let expected = PrimitiveArray::from_iter((0..1000).map(|i| unique_values[i % 32])); let dict = dict_encode(&expected.clone().into_array()).unwrap(); + #[expect(deprecated)] let actual = dict.as_array().to_primitive(); assert_arrays_eq!(actual, expected); } - #[expect(deprecated)] #[test] fn canonicalise_non_nullable_primitive_100_unique_values() { let unique_values: Vec = (0..100).collect(); let expected = PrimitiveArray::from_iter((0..1000).map(|i| unique_values[i % 100])); let dict = dict_encode(&expected.clone().into_array()).unwrap(); + #[expect(deprecated)] let actual = dict.as_array().to_primitive(); assert_arrays_eq!(actual, expected); } - #[expect(deprecated)] #[test] fn canonicalise_nullable_varbin() { let reference = VarBinViewArray::from_iter( @@ -131,6 +130,7 @@ mod test { ); assert_eq!(reference.len(), 6); let dict = dict_encode(&reference.clone().into_array()).unwrap(); + #[expect(deprecated)] let flattened_dict = dict.as_array().to_varbinview(); assert_eq!( flattened_dict.with_iterator(|iter| iter diff --git a/vortex-array/src/arrays/extension/compute/cast.rs b/vortex-array/src/arrays/extension/compute/cast.rs index 7e026cc714f..af42fd5c9ea 100644 --- a/vortex-array/src/arrays/extension/compute/cast.rs +++ b/vortex-array/src/arrays/extension/compute/cast.rs @@ -95,7 +95,6 @@ mod tests { assert_eq!(output.dtype(), &new_dtype); } - #[expect(deprecated)] #[test] fn cast_different_ext_dtype() { let original_dtype = @@ -106,12 +105,12 @@ mod tests { let storage = buffer![1i64].into_array(); let arr = ExtensionArray::new(original_dtype, storage); - assert!( - arr.into_array() - .cast(DType::Extension(target_dtype)) - .and_then(|a| a.to_canonical().map(|c| c.into_array())) - .is_err() - ); + #[expect(deprecated)] + let result = arr + .into_array() + .cast(DType::Extension(target_dtype)) + .and_then(|a| a.to_canonical().map(|c| c.into_array())); + assert!(result.is_err()); } #[test] diff --git a/vortex-array/src/arrays/extension/compute/rules.rs b/vortex-array/src/arrays/extension/compute/rules.rs index c4e8a8aea72..6a58e4838be 100644 --- a/vortex-array/src/arrays/extension/compute/rules.rs +++ b/vortex-array/src/arrays/extension/compute/rules.rs @@ -119,7 +119,6 @@ mod tests { .erased() } - #[expect(deprecated)] #[test] fn test_filter_pushdown() { let ext_dtype = test_ext_dtype(); @@ -145,11 +144,12 @@ mod tests { assert_eq!(ext_result.ext_dtype(), &ext_dtype); // Check the storage values - let storage_result: &[i64] = &ext_result.storage_array().to_primitive().to_buffer::(); + #[expect(deprecated)] + let storage_prim = ext_result.storage_array().to_primitive(); + let storage_result: &[i64] = &storage_prim.to_buffer::(); assert_eq!(storage_result, &[1, 3, 5]); } - #[expect(deprecated)] #[test] fn test_filter_pushdown_nullable() { let ext_dtype = ExtDType::::try_new( @@ -172,6 +172,7 @@ mod tests { assert_eq!(ext_result.len(), 3); // Check values: should be [Some(1), None, None] + #[expect(deprecated)] let canonical = ext_result.storage_array().to_primitive(); assert_eq!(canonical.len(), 3); } diff --git a/vortex-array/src/arrays/filter/execute/bool.rs b/vortex-array/src/arrays/filter/execute/bool.rs index 0b9441f52ae..a22e55366fc 100644 --- a/vortex-array/src/arrays/filter/execute/bool.rs +++ b/vortex-array/src/arrays/filter/execute/bool.rs @@ -35,12 +35,12 @@ mod test { use crate::canonical::ToCanonical as _; use crate::compute::conformance::filter::test_filter_conformance; - #[expect(deprecated)] #[test] fn filter_bool_test() { let arr = BoolArray::from_iter([true, true, false]); let mask = Mask::from_iter([true, false, true]); + #[expect(deprecated)] let filtered = arr.filter(mask).unwrap().to_bool(); assert_eq!(2, filtered.len()); diff --git a/vortex-array/src/arrays/filter/execute/listview.rs b/vortex-array/src/arrays/filter/execute/listview.rs index 49a54aac882..1bc99de5fba 100644 --- a/vortex-array/src/arrays/filter/execute/listview.rs +++ b/vortex-array/src/arrays/filter/execute/listview.rs @@ -180,7 +180,6 @@ mod test { assert_arrays_eq!(filtered, expected); } - #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_preserves_unreferenced_elements() { @@ -198,6 +197,7 @@ mod test { // Filter to keep only 2 lists. let mask = Mask::from_iter([true, false, false, true, false]); let result = listview.filter(mask).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 2, "Wrong number of filtered lists"); @@ -213,7 +213,6 @@ mod test { assert_eq!(result_list.offset_at(1), 0, "Wrong offset at index 3"); } - #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_with_gaps() { @@ -231,6 +230,7 @@ mod test { // Filter to keep lists with gaps and overlaps. let mask = Mask::from_iter([false, true, true, true, false]); let result = listview.filter(mask).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 3, "Wrong filter result length"); @@ -253,7 +253,6 @@ mod test { ); } - #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_constant_arrays() { @@ -275,6 +274,7 @@ mod test { let mask1 = Mask::from_iter([true, false, true, false]); let result1 = const_offset_list.filter(mask1).unwrap(); + #[expect(deprecated)] let result1_list = result1.to_listview(); assert_eq!(result1_list.len(), 2); @@ -298,6 +298,7 @@ mod test { let mask2 = Mask::from_iter([true, false, true]); let result2 = both_const_list.filter(mask2).unwrap(); + #[expect(deprecated)] let result2_list = result2.to_listview(); assert_eq!(result2_list.len(), 2); @@ -307,7 +308,6 @@ mod test { assert_eq!(result2_list.size_at(1), 3); } - #[expect(deprecated)] #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] #[test] fn test_filter_extreme_offsets() { @@ -325,6 +325,7 @@ mod test { // Filter to keep only 2 lists, demonstrating we keep all 10000 elements. let mask = Mask::from_iter([false, true, false, false, true]); let result = listview.filter(mask).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 2); @@ -360,6 +361,7 @@ mod test { // Test sparse selection from large dataset. let sparse_mask = Mask::from_iter((0..5).map(|i| i == 0 || i == 4)); let sparse_result = listview.filter(sparse_mask).unwrap(); + #[expect(deprecated)] let sparse_list = sparse_result.to_listview(); assert_eq!(sparse_list.len(), 2); diff --git a/vortex-array/src/arrays/filter/execute/primitive.rs b/vortex-array/src/arrays/filter/execute/primitive.rs index 4e2a3ee863a..0aae5738da7 100644 --- a/vortex-array/src/arrays/filter/execute/primitive.rs +++ b/vortex-array/src/arrays/filter/execute/primitive.rs @@ -41,12 +41,12 @@ mod test { use crate::compute::conformance::filter::MEDIUM_SIZE; use crate::compute::conformance::filter::test_filter_conformance; - #[expect(deprecated)] #[test] fn filter_run_variant_mixed_test() { let mask = [true, true, false, true, true, true, false, true]; let arr = PrimitiveArray::from_iter([1u32, 24, 54, 2, 3, 2, 3, 2]); + #[expect(deprecated)] let filtered = arr.filter(Mask::from_iter(mask)).unwrap().to_primitive(); assert_eq!( filtered.len(), diff --git a/vortex-array/src/arrays/fixed_size_list/tests/nested.rs b/vortex-array/src/arrays/fixed_size_list/tests/nested.rs index 686fc3f7be9..efd6f630580 100644 --- a/vortex-array/src/arrays/fixed_size_list/tests/nested.rs +++ b/vortex-array/src/arrays/fixed_size_list/tests/nested.rs @@ -28,7 +28,6 @@ use crate::validity::Validity; // FSL of FSL tests //////////////////////////////////////////////////////////////////////////////////////////////////// -#[expect(deprecated)] #[test] fn test_fsl_of_fsl_basic() { let outer_len = 2; @@ -86,6 +85,7 @@ fn test_fsl_of_fsl_basic() { let first_outer_list = outer_fsl.fixed_size_list_elements_at(0).unwrap(); // Check first inner list [1,2]. + #[expect(deprecated)] let inner_list_0 = first_outer_list .to_fixed_size_list() .fixed_size_list_elements_at(0) @@ -104,6 +104,7 @@ fn test_fsl_of_fsl_basic() { ); // Check second inner list [3,4]. + #[expect(deprecated)] let inner_list_1 = first_outer_list .to_fixed_size_list() .fixed_size_list_elements_at(1) @@ -122,6 +123,7 @@ fn test_fsl_of_fsl_basic() { ); // Check third inner list [5,6]. + #[expect(deprecated)] let inner_list_2 = first_outer_list .to_fixed_size_list() .fixed_size_list_elements_at(2) @@ -143,6 +145,7 @@ fn test_fsl_of_fsl_basic() { let second_outer_list = outer_fsl.fixed_size_list_elements_at(1).unwrap(); // Check first inner list [7,8]. + #[expect(deprecated)] let inner_list_0 = second_outer_list .to_fixed_size_list() .fixed_size_list_elements_at(0) @@ -161,6 +164,7 @@ fn test_fsl_of_fsl_basic() { ); // Check second inner list [9,10]. + #[expect(deprecated)] let inner_list_1 = second_outer_list .to_fixed_size_list() .fixed_size_list_elements_at(1) @@ -179,6 +183,7 @@ fn test_fsl_of_fsl_basic() { ); // Check third inner list [11,12]. + #[expect(deprecated)] let inner_list_2 = second_outer_list .to_fixed_size_list() .fixed_size_list_elements_at(2) @@ -263,7 +268,6 @@ fn test_fsl_of_fsl_with_nulls() { ); } -#[expect(deprecated)] #[test] fn test_deeply_nested_fsl() { let _len = 2; @@ -304,16 +308,19 @@ fn test_deeply_nested_fsl() { // Check the actual deeply nested values. // Structure: [[[1,2],[3,4]],[[5,6],[7,8]]]. let top_level = level3.fixed_size_list_elements_at(0).unwrap(); + #[expect(deprecated)] let level2_0 = top_level .to_fixed_size_list() .fixed_size_list_elements_at(0) .unwrap(); + #[expect(deprecated)] let level2_1 = top_level .to_fixed_size_list() .fixed_size_list_elements_at(1) .unwrap(); // First level-2 list: [[1,2],[3,4]]. + #[expect(deprecated)] let level1_0_0 = level2_0 .to_fixed_size_list() .fixed_size_list_elements_at(0) @@ -331,6 +338,7 @@ fn test_deeply_nested_fsl() { 2i32.into() ); + #[expect(deprecated)] let level1_0_1 = level2_0 .to_fixed_size_list() .fixed_size_list_elements_at(1) @@ -349,6 +357,7 @@ fn test_deeply_nested_fsl() { ); // Second level-2 list: [[5,6],[7,8]]. + #[expect(deprecated)] let level1_1_0 = level2_1 .to_fixed_size_list() .fixed_size_list_elements_at(0) @@ -366,6 +375,7 @@ fn test_deeply_nested_fsl() { 6i32.into() ); + #[expect(deprecated)] let level1_1_1 = level2_1 .to_fixed_size_list() .fixed_size_list_elements_at(1) diff --git a/vortex-array/src/arrays/list/array.rs b/vortex-array/src/arrays/list/array.rs index 6df72f2875b..033845088b5 100644 --- a/vortex-array/src/arrays/list/array.rs +++ b/vortex-array/src/arrays/list/array.rs @@ -324,11 +324,12 @@ pub trait ListArrayExt: TypedArrayRef { self.elements().dtype() } - #[expect(deprecated)] fn reset_offsets(&self, recurse: bool) -> VortexResult> { let mut elements = self.sliced_elements()?; if recurse && elements.is_canonical() { - elements = elements.to_canonical()?.compact()?.into_array(); + #[expect(deprecated)] + let compacted = elements.to_canonical()?.compact()?.into_array(); + elements = compacted; } else if recurse && let Some(child_list_array) = elements.as_opt::() { elements = child_list_array .into_owned() diff --git a/vortex-array/src/arrays/list/compute/cast.rs b/vortex-array/src/arrays/list/compute/cast.rs index 3215a17f803..c9813cfe92d 100644 --- a/vortex-array/src/arrays/list/compute/cast.rs +++ b/vortex-array/src/arrays/list/compute/cast.rs @@ -75,7 +75,6 @@ mod tests { assert_eq!(result.len(), list.len()); } - #[expect(deprecated)] #[test] fn test_cast_to_wrong_type() { let list = ListArray::try_new( @@ -88,14 +87,14 @@ mod tests { let target_dtype = DType::Primitive(PType::U64, Nullability::NonNullable); // can't cast list to u64 - let result = list - .into_array() - .cast(target_dtype) - .and_then(|a| a.to_canonical().map(|c| c.into_array())); + let result = list.into_array().cast(target_dtype).and_then(|a| { + #[expect(deprecated)] + let canonical = a.to_canonical().map(|c| c.into_array()); + canonical + }); assert!(result.is_err()); } - #[expect(deprecated)] #[test] fn test_cant_cast_nulls_to_non_null() { // Test that if list has nulls, the conversion will fail @@ -113,10 +112,11 @@ mod tests { Nullability::NonNullable, ); - let result = list - .into_array() - .cast(target_dtype) - .and_then(|a| a.to_canonical().map(|c| c.into_array())); + let result = list.into_array().cast(target_dtype).and_then(|a| { + #[expect(deprecated)] + let canonical = a.to_canonical().map(|c| c.into_array()); + canonical + }); assert!(result.is_err()); // Nulls in list element array — the inner cast error is deferred until diff --git a/vortex-array/src/arrays/list/compute/take.rs b/vortex-array/src/arrays/list/compute/take.rs index a7573a68558..33551227b68 100644 --- a/vortex-array/src/arrays/list/compute/take.rs +++ b/vortex-array/src/arrays/list/compute/take.rs @@ -213,7 +213,6 @@ mod test { use crate::scalar::Scalar; use crate::validity::Validity; - #[expect(deprecated)] #[test] fn nullable_take() { let list = ListArray::try_new( @@ -237,6 +236,7 @@ mod test { ) ); + #[expect(deprecated)] let result = result.to_listview(); assert_eq!(result.len(), 4); @@ -317,7 +317,6 @@ mod test { ); } - #[expect(deprecated)] #[test] fn non_nullable_take() { let list = ListArray::try_new( @@ -340,6 +339,7 @@ mod test { ) ); + #[expect(deprecated)] let result = result.to_listview(); assert_eq!(result.len(), 3); @@ -456,7 +456,6 @@ mod test { test_take_conformance(&list.into_array()); } - #[expect(deprecated)] #[test] fn test_u64_offset_accumulation_non_nullable() { let elements = buffer![0i32; 200].into_array(); @@ -471,6 +470,7 @@ mod test { assert_eq!(result.len(), 2); + #[expect(deprecated)] let result_view = result.to_listview(); assert_eq!(result_view.len(), 2); assert!( @@ -485,7 +485,6 @@ mod test { ); } - #[expect(deprecated)] #[test] fn test_u64_offset_accumulation_nullable() { let elements = buffer![0i32; 150].into_array(); @@ -501,6 +500,7 @@ mod test { assert_eq!(result.len(), 3); + #[expect(deprecated)] let result_view = result.to_listview(); assert_eq!(result_view.len(), 3); assert!( diff --git a/vortex-array/src/arrays/listview/array.rs b/vortex-array/src/arrays/listview/array.rs index 0e9104794c6..cae55bf0828 100644 --- a/vortex-array/src/arrays/listview/array.rs +++ b/vortex-array/src/arrays/listview/array.rs @@ -209,7 +209,6 @@ impl ListViewData { } /// Validates the components that would be used to create a `ListViewArray`. - #[expect(deprecated)] pub fn validate( elements: &ArrayRef, offsets: &ArrayRef, @@ -251,7 +250,9 @@ impl ListViewData { // Skip host-only validation when offsets/sizes are not host-resident. if offsets.is_host() && sizes.is_host() { + #[expect(deprecated)] let offsets_primitive = offsets.to_primitive(); + #[expect(deprecated)] let sizes_primitive = sizes.to_primitive(); // Validate the `offsets` and `sizes` arrays. @@ -383,14 +384,12 @@ pub trait ListViewArrayExt: TypedArrayRef { self.elements().slice(offset..offset + size) } - #[expect(deprecated)] fn verify_is_zero_copy_to_list(&self) -> bool { - validate_zctl( - self.elements(), - self.offsets().to_primitive(), - self.sizes().to_primitive(), - ) - .is_ok() + #[expect(deprecated)] + let offsets_primitive = self.offsets().to_primitive(); + #[expect(deprecated)] + let sizes_primitive = self.sizes().to_primitive(); + validate_zctl(self.elements(), offsets_primitive, sizes_primitive).is_ok() } } impl> ListViewArrayExt for T {} @@ -457,15 +456,14 @@ impl Array { /// # Safety /// /// See [`ListViewData::with_zero_copy_to_list`]. - #[expect(deprecated)] pub unsafe fn with_zero_copy_to_list(self, is_zctl: bool) -> Self { if cfg!(debug_assertions) && is_zctl { - validate_zctl( - self.elements(), - self.offsets().to_primitive(), - self.sizes().to_primitive(), - ) - .vortex_expect("Failed to validate zero-copy to list flag"); + #[expect(deprecated)] + let offsets_primitive = self.offsets().to_primitive(); + #[expect(deprecated)] + let sizes_primitive = self.sizes().to_primitive(); + validate_zctl(self.elements(), offsets_primitive, sizes_primitive) + .vortex_expect("Failed to validate zero-copy to list flag"); } let dtype = self.dtype().clone(); let len = self.len(); diff --git a/vortex-array/src/arrays/listview/conversion.rs b/vortex-array/src/arrays/listview/conversion.rs index cd4c89b0697..54ee8c2705c 100644 --- a/vortex-array/src/arrays/listview/conversion.rs +++ b/vortex-array/src/arrays/listview/conversion.rs @@ -140,7 +140,6 @@ pub fn list_from_list_view(list_view: ListViewArray) -> VortexResult /// /// The `ListViewArray` must have offsets that are sorted, and every size must be equal to the gap /// between `offset[i]` and `offset[i + 1]`. -#[expect(deprecated)] unsafe fn build_list_offsets_from_list_view( list_view: &ListViewArray, ) -> ArrayRef { @@ -151,6 +150,7 @@ unsafe fn build_list_offsets_from_list_view( // Create uninit range for direct memory access. let mut offsets_range = offsets_builder.uninit_range(len + 1); + #[expect(deprecated)] let offsets = list_view.offsets().to_primitive(); let offsets_slice = offsets.as_slice::(); debug_assert!(offsets_slice.is_sorted()); @@ -184,12 +184,12 @@ unsafe fn build_list_offsets_from_list_view( /// Recursively converts all `ListViewArray`s to `ListArray`s in a nested array structure. /// /// The conversion happens bottom-up, processing children before parents. -#[expect(deprecated)] pub fn recursive_list_from_list_view(array: ArrayRef) -> VortexResult { if !array.dtype().is_nested() { return Ok(array); } + #[expect(deprecated)] let canonical = array.to_canonical()?; Ok(match canonical { diff --git a/vortex-array/src/arrays/listview/rebuild.rs b/vortex-array/src/arrays/listview/rebuild.rs index e5e1910c424..d2ab4d92df7 100644 --- a/vortex-array/src/arrays/listview/rebuild.rs +++ b/vortex-array/src/arrays/listview/rebuild.rs @@ -114,10 +114,10 @@ impl ListViewArray { /// Picks between [`rebuild_with_take`](Self::rebuild_with_take) and /// [`rebuild_list_by_list`](Self::rebuild_list_by_list) based on element dtype and average /// list size. - #[expect(deprecated)] fn naive_rebuild( &self, ) -> VortexResult { + #[expect(deprecated)] let sizes_canonical = self.sizes().to_primitive(); let total: u64 = sizes_canonical .as_slice::() @@ -148,12 +148,13 @@ impl ListViewArray { /// Rebuilds elements using a single bulk `take`: collect all element indices into a flat /// `BufferMut`, perform a single `take`. - #[expect(deprecated)] fn rebuild_with_take( &self, ) -> VortexResult { + #[expect(deprecated)] let offsets_canonical = self.offsets().to_primitive(); let offsets_slice = offsets_canonical.as_slice::(); + #[expect(deprecated)] let sizes_canonical = self.sizes().to_primitive(); let sizes_slice = sizes_canonical.as_slice::(); @@ -197,7 +198,6 @@ impl ListViewArray { /// Rebuilds elements list-by-list: canonicalize elements upfront, then for each list `slice` /// the relevant range and `extend_from_array` into a typed builder. - #[expect(deprecated)] fn rebuild_list_by_list( &self, ) -> VortexResult { @@ -206,8 +206,10 @@ impl ListViewArray { .as_list_element_opt() .vortex_expect("somehow had a canonical list that was not a list"); + #[expect(deprecated)] let offsets_canonical = self.offsets().to_primitive(); let offsets_slice = offsets_canonical.as_slice::(); + #[expect(deprecated)] let sizes_canonical = self.sizes().to_primitive(); let sizes_slice = sizes_canonical.as_slice::(); @@ -221,6 +223,7 @@ impl ListViewArray { let mut new_sizes = BufferMut::::with_capacity(len); // Canonicalize the elements up front as we will be slicing the elements quite a lot. + #[expect(deprecated)] let elements_canonical = self .elements() .to_canonical() @@ -468,7 +471,6 @@ mod tests { Ok(()) } - #[expect(deprecated)] #[test] fn test_rebuild_trim_elements_basic() -> VortexResult<()> { // Test trimming both leading and trailing unused elements while preserving gaps in the @@ -508,6 +510,7 @@ mod tests { ); // Note that element at index 2 (97) is preserved as a gap. + #[expect(deprecated)] let all_elements = trimmed.elements().to_primitive(); assert_eq!( all_elements diff --git a/vortex-array/src/arrays/listview/tests/filter.rs b/vortex-array/src/arrays/listview/tests/filter.rs index ff20a410249..26a5190e517 100644 --- a/vortex-array/src/arrays/listview/tests/filter.rs +++ b/vortex-array/src/arrays/listview/tests/filter.rs @@ -35,7 +35,6 @@ fn test_filter_listview_conformance(#[case] listview: ListViewArray) { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] -#[expect(deprecated)] #[test] fn test_filter_preserves_unreferenced_elements() { // ListView-specific: Test that filter preserves the entire elements array. @@ -51,6 +50,7 @@ fn test_filter_preserves_unreferenced_elements() { // Filter to keep only 2 lists. let mask = Mask::from_iter([true, false, false, true, false]); let result = listview.filter(mask).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 2, "Wrong number of filtered lists"); @@ -67,7 +67,6 @@ fn test_filter_preserves_unreferenced_elements() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] -#[expect(deprecated)] #[test] fn test_filter_with_gaps() { // ListView-specific: Test filtering with gaps in elements array. @@ -83,6 +82,7 @@ fn test_filter_with_gaps() { // Filter to keep lists with gaps and overlaps. let mask = Mask::from_iter([false, true, true, true, false]); let result = listview.filter(mask).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 3, "Wrong filter result length"); @@ -106,7 +106,6 @@ fn test_filter_with_gaps() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] -#[expect(deprecated)] #[test] fn test_filter_constant_arrays() { // ListView-specific: Test filter with ConstantArray for offsets/sizes. @@ -127,6 +126,7 @@ fn test_filter_constant_arrays() { let mask1 = Mask::from_iter([true, false, true, false]); let result1 = const_offset_list.filter(mask1).unwrap(); + #[expect(deprecated)] let result1_list = result1.to_listview(); assert_eq!(result1_list.len(), 2); @@ -150,6 +150,7 @@ fn test_filter_constant_arrays() { let mask2 = Mask::from_iter([true, false, true]); let result2 = both_const_list.filter(mask2).unwrap(); + #[expect(deprecated)] let result2_list = result2.to_listview(); assert_eq!(result2_list.len(), 2); @@ -160,7 +161,6 @@ fn test_filter_constant_arrays() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `filter`"] -#[expect(deprecated)] #[test] fn test_filter_extreme_offsets() { // ListView-specific: Test with very large offsets. @@ -176,6 +176,7 @@ fn test_filter_extreme_offsets() { // Filter to keep only 2 lists, demonstrating we keep all 10000 elements. let mask = Mask::from_iter([false, true, false, false, true]); let result = listview.filter(mask).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 2); @@ -211,6 +212,7 @@ fn test_filter_extreme_offsets() { // Test sparse selection from large dataset. let sparse_mask = Mask::from_iter((0..5).map(|i| i == 0 || i == 4)); let sparse_result = listview.filter(sparse_mask).unwrap(); + #[expect(deprecated)] let sparse_list = sparse_result.to_listview(); assert_eq!(sparse_list.len(), 2); diff --git a/vortex-array/src/arrays/listview/tests/take.rs b/vortex-array/src/arrays/listview/tests/take.rs index 6f46d080689..a162d61b217 100644 --- a/vortex-array/src/arrays/listview/tests/take.rs +++ b/vortex-array/src/arrays/listview/tests/take.rs @@ -36,7 +36,6 @@ fn test_take_listview_conformance(#[case] listview: ListViewArray) { // ListView-specific tests that aren't covered by conformance. #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] -#[expect(deprecated)] #[test] fn test_take_preserves_unreferenced_elements() { // ListView-specific: Test that take preserves the entire elements array @@ -50,6 +49,7 @@ fn test_take_preserves_unreferenced_elements() { // Take only 2 lists. let indices = buffer![1u32, 3].into_array(); let result = listview.take(indices).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 2); @@ -66,7 +66,6 @@ fn test_take_preserves_unreferenced_elements() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] -#[expect(deprecated)] #[test] fn test_take_with_gaps() { // ListView-specific: Test with gaps in elements array. @@ -79,6 +78,7 @@ fn test_take_with_gaps() { let indices = buffer![1u32, 3, 4, 2].into_array(); let result = listview.take(indices).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); // Verify the entire elements array is preserved including gaps. @@ -95,7 +95,6 @@ fn test_take_with_gaps() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] -#[expect(deprecated)] #[test] fn test_take_constant_arrays() { // ListView-specific: Test with ConstantArray for offsets/sizes. @@ -115,6 +114,7 @@ fn test_take_constant_arrays() { let indices = buffer![3u32, 0, 2].into_array(); let result = const_offset_list.take(indices).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 3); @@ -139,6 +139,7 @@ fn test_take_constant_arrays() { let indices2 = buffer![2u32, 0].into_array(); let result2 = both_const_list.take(indices2).unwrap(); + #[expect(deprecated)] let result2_list = result2.to_listview(); assert_eq!(result2_list.len(), 2); @@ -149,7 +150,6 @@ fn test_take_constant_arrays() { } #[ignore = "TODO(connor)[ListView]: Don't rebuild ListView after every `take`"] -#[expect(deprecated)] #[test] fn test_take_extreme_offsets() { // ListView-specific: Test with very large offsets to demonstrate @@ -165,6 +165,7 @@ fn test_take_extreme_offsets() { // Take only 2 lists, demonstrating we keep all 10000 elements. let indices = buffer![1u32, 4].into_array(); let result = listview.take(indices).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 2); diff --git a/vortex-array/src/arrays/masked/tests.rs b/vortex-array/src/arrays/masked/tests.rs index 545c62ce612..a2db8c07f1a 100644 --- a/vortex-array/src/arrays/masked/tests.rs +++ b/vortex-array/src/arrays/masked/tests.rs @@ -57,13 +57,13 @@ fn test_canonical_dtype_matches_array_dtype() -> VortexResult<()> { } #[test] -#[expect(deprecated)] fn test_masked_child_with_validity() { // When validity has nulls, masked_child should apply inverted mask. let child = PrimitiveArray::from_iter([1i32, 2, 3, 4, 5]).into_array(); let array = MaskedArray::try_new(child, Validity::from_iter([true, false, true, false, true])).unwrap(); + #[expect(deprecated)] let prim = array.as_array().to_primitive(); // Positions where validity is false should be null in masked_child. diff --git a/vortex-array/src/arrays/null/compute/mod.rs b/vortex-array/src/arrays/null/compute/mod.rs index 4e539df1c58..502bb8fcc06 100644 --- a/vortex-array/src/arrays/null/compute/mod.rs +++ b/vortex-array/src/arrays/null/compute/mod.rs @@ -27,9 +27,9 @@ mod test { use crate::dtype::DType; #[test] - #[expect(deprecated)] fn test_slice_nulls() { let nulls = NullArray::new(10); + #[expect(deprecated)] let sliced = nulls.slice(0..4).unwrap().to_null(); assert_eq!(sliced.len(), 4); @@ -45,9 +45,9 @@ mod test { } #[test] - #[expect(deprecated)] fn test_take_nulls() { let nulls = NullArray::new(10); + #[expect(deprecated)] let taken = nulls .take(buffer![0u64, 2, 4, 6, 8].into_array()) .unwrap() diff --git a/vortex-array/src/arrays/null/compute/take.rs b/vortex-array/src/arrays/null/compute/take.rs index 6ab459b3aa9..5352ae67653 100644 --- a/vortex-array/src/arrays/null/compute/take.rs +++ b/vortex-array/src/arrays/null/compute/take.rs @@ -18,8 +18,8 @@ use crate::optimizer::rules::ParentRuleSet; impl TakeReduce for Null { #[expect(clippy::cast_possible_truncation)] - #[expect(deprecated)] fn take(array: ArrayView<'_, Null>, indices: &ArrayRef) -> VortexResult> { + #[expect(deprecated)] let indices = indices.to_primitive(); // Enforce all indices are valid diff --git a/vortex-array/src/arrays/patched/compute/take.rs b/vortex-array/src/arrays/patched/compute/take.rs index 4f3403e6f3c..893d18db1ac 100644 --- a/vortex-array/src/arrays/patched/compute/take.rs +++ b/vortex-array/src/arrays/patched/compute/take.rs @@ -167,13 +167,13 @@ mod tests { } #[test] - #[expect(deprecated)] fn test_take_basic() -> VortexResult<()> { // Array with base values [0, 0, 0, 0, 0] patched at indices [1, 3] with values [10, 30] let array = make_patched_array(&[0; 5], &[1, 3], &[10, 30], 0..5)?; // Take indices [0, 1, 2, 3, 4] - should get [0, 10, 0, 30, 0] let indices = buffer![0u32, 1, 2, 3, 4].into_array(); + #[expect(deprecated)] let result = array.take(indices)?.to_canonical()?.into_array(); let expected = PrimitiveArray::from_iter([0u16, 10, 0, 30, 0]).into_array(); @@ -183,11 +183,11 @@ mod tests { } #[test] - #[expect(deprecated)] fn test_take_sliced() -> VortexResult<()> { let array = make_patched_array(&[0; 10], &[1, 3], &[100, 200], 2..10)?; let indices = buffer![0u32, 1, 2, 3, 7].into_array(); + #[expect(deprecated)] let result = array.take(indices)?.to_canonical()?.into_array(); let expected = PrimitiveArray::from_iter([0u16, 200, 0, 0, 0]).into_array(); @@ -197,13 +197,13 @@ mod tests { } #[test] - #[expect(deprecated)] fn test_take_out_of_order() -> VortexResult<()> { // Array with base values [0, 0, 0, 0, 0] patched at indices [1, 3] with values [10, 30] let array = make_patched_array(&[0; 5], &[1, 3], &[10, 30], 0..5)?; // Take indices in reverse order let indices = buffer![4u32, 3, 2, 1, 0].into_array(); + #[expect(deprecated)] let result = array.take(indices)?.to_canonical()?.into_array(); let expected = PrimitiveArray::from_iter([0u16, 30, 0, 10, 0]).into_array(); @@ -213,16 +213,17 @@ mod tests { } #[test] - #[expect(deprecated)] fn test_take_duplicates() -> VortexResult<()> { // Array with base values [0, 0, 0, 0, 0] patched at index [2] with value [99] let array = make_patched_array(&[0; 5], &[2], &[99], 0..5)?; // Take the same patched index multiple times let indices = buffer![2u32, 2, 0, 2].into_array(); + #[expect(deprecated)] let result = array.take(indices)?.to_canonical()?.into_array(); // execute the array. + #[expect(deprecated)] let _canonical = result.to_canonical()?.into_primitive(); let expected = PrimitiveArray::from_iter([99u16, 99, 0, 99]).into_array(); @@ -232,7 +233,6 @@ mod tests { } #[test] - #[expect(deprecated)] fn test_take_with_null_indices() -> VortexResult<()> { use crate::arrays::BoolArray; use crate::validity::Validity; @@ -255,6 +255,7 @@ mod tests { .into_array(), ), ); + #[expect(deprecated)] let result = array .take(indices.into_array())? .to_canonical()? diff --git a/vortex-array/src/arrays/primitive/array/accessor.rs b/vortex-array/src/arrays/primitive/array/accessor.rs index 887cb5a02e2..f26b201ea2b 100644 --- a/vortex-array/src/arrays/primitive/array/accessor.rs +++ b/vortex-array/src/arrays/primitive/array/accessor.rs @@ -13,7 +13,6 @@ use crate::dtype::NativePType; use crate::validity::Validity; impl ArrayAccessor for PrimitiveArray { - #[expect(deprecated)] fn with_iterator(&self, f: F) -> R where F: for<'a> FnOnce(&mut dyn Iterator>) -> R, @@ -28,6 +27,7 @@ impl ArrayAccessor for PrimitiveArray { } Validity::AllInvalid => f(&mut iter::repeat_n(None, self.len())), Validity::Array(v) => { + #[expect(deprecated)] let validity = v.to_bool().into_bit_buffer(); let mut iter = self .as_slice::() diff --git a/vortex-array/src/arrays/primitive/array/mod.rs b/vortex-array/src/arrays/primitive/array/mod.rs index ad6075bf495..21b474984a4 100644 --- a/vortex-array/src/arrays/primitive/array/mod.rs +++ b/vortex-array/src/arrays/primitive/array/mod.rs @@ -145,7 +145,6 @@ pub trait PrimitiveArrayExt: TypedArrayRef { } /// Narrow the array to the smallest possible integer type that can represent all values. - #[expect(deprecated)] fn narrow(&self) -> VortexResult { if !self.ptype().is_int() { return Ok(self.to_owned()); @@ -181,46 +180,58 @@ pub trait PrimitiveArrayExt: TypedArrayRef { if min < 0 || max < 0 { // Signed if min >= i8::MIN as i64 && max <= i8::MAX as i64 { - return Ok(self + #[expect(deprecated)] + let result = self .as_ref() .cast(DType::Primitive(PType::I8, nullability))? - .to_primitive()); + .to_primitive(); + return Ok(result); } if min >= i16::MIN as i64 && max <= i16::MAX as i64 { - return Ok(self + #[expect(deprecated)] + let result = self .as_ref() .cast(DType::Primitive(PType::I16, nullability))? - .to_primitive()); + .to_primitive(); + return Ok(result); } if min >= i32::MIN as i64 && max <= i32::MAX as i64 { - return Ok(self + #[expect(deprecated)] + let result = self .as_ref() .cast(DType::Primitive(PType::I32, nullability))? - .to_primitive()); + .to_primitive(); + return Ok(result); } } else { // Unsigned if max <= u8::MAX as i64 { - return Ok(self + #[expect(deprecated)] + let result = self .as_ref() .cast(DType::Primitive(PType::U8, nullability))? - .to_primitive()); + .to_primitive(); + return Ok(result); } if max <= u16::MAX as i64 { - return Ok(self + #[expect(deprecated)] + let result = self .as_ref() .cast(DType::Primitive(PType::U16, nullability))? - .to_primitive()); + .to_primitive(); + return Ok(result); } if max <= u32::MAX as i64 { - return Ok(self + #[expect(deprecated)] + let result = self .as_ref() .cast(DType::Primitive(PType::U32, nullability))? - .to_primitive()); + .to_primitive(); + return Ok(result); } } @@ -467,7 +478,6 @@ impl Array { } } - #[expect(deprecated)] pub fn map_each_with_validity(self, f: F) -> VortexResult where T: NativePType, @@ -486,6 +496,7 @@ impl Array { BufferMut::::from_iter(buf_iter.zip(iter::repeat(false)).map(f)) } Validity::Array(val) => { + #[expect(deprecated)] let val = val.to_bool().into_bit_buffer(); BufferMut::::from_iter(buf_iter.zip(val.iter()).map(f)) } @@ -527,7 +538,6 @@ impl PrimitiveData { } /// Create a PrimitiveArray from a byte buffer containing only the valid elements. - #[expect(deprecated)] pub fn from_values_byte_buffer( valid_elems_buffer: ByteBuffer, ptype: PType, @@ -540,6 +550,7 @@ impl PrimitiveData { Validity::AllValid | Validity::NonNullable => valid_elems_buffer.aligned(alignment), Validity::AllInvalid => ByteBuffer::zeroed_aligned(n_rows * byte_width, alignment), Validity::Array(is_valid) => { + #[expect(deprecated)] let bool_array = is_valid.to_bool(); let bool_buffer = bool_array.to_bit_buffer(); let mut bytes = ByteBufferMut::zeroed_aligned(n_rows * byte_width, alignment); diff --git a/vortex-array/src/arrays/primitive/array/patch.rs b/vortex-array/src/arrays/primitive/array/patch.rs index 60ea37f59bb..197db4d3854 100644 --- a/vortex-array/src/arrays/primitive/array/patch.rs +++ b/vortex-array/src/arrays/primitive/array/patch.rs @@ -172,12 +172,13 @@ mod tests { } #[test] - #[expect(deprecated)] fn patch_sliced() { let input = PrimitiveArray::new(buffer![2u32; 10], Validity::AllValid); let sliced = input.slice(2..8).unwrap(); + #[expect(deprecated)] + let sliced_primitive = sliced.to_primitive(); assert_arrays_eq!( - sliced.to_primitive(), + sliced_primitive, PrimitiveArray::new(buffer![2u32; 6], Validity::AllValid) ); } diff --git a/vortex-array/src/arrays/primitive/compute/cast.rs b/vortex-array/src/arrays/primitive/compute/cast.rs index 8551791c8ac..f1c9d3bcdbc 100644 --- a/vortex-array/src/arrays/primitive/compute/cast.rs +++ b/vortex-array/src/arrays/primitive/compute/cast.rs @@ -130,16 +130,17 @@ mod test { use crate::validity::Validity; #[test] - #[expect(deprecated)] fn cast_u32_u8() { let arr = buffer![0u32, 10, 200].into_array(); // cast from u32 to u8 + #[expect(deprecated)] let p = arr.cast(PType::U8.into()).unwrap().to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([0u8, 10, 200])); assert!(matches!(p.validity(), Ok(Validity::NonNullable))); // to nullable + #[expect(deprecated)] let p = p .into_array() .cast(DType::Primitive(PType::U8, Nullability::Nullable)) @@ -152,6 +153,7 @@ mod test { assert!(matches!(p.validity(), Ok(Validity::AllValid))); // back to non-nullable + #[expect(deprecated)] let p = p .into_array() .cast(DType::Primitive(PType::U8, Nullability::NonNullable)) @@ -161,6 +163,7 @@ mod test { assert!(matches!(p.validity(), Ok(Validity::NonNullable))); // to nullable u32 + #[expect(deprecated)] let p = p .into_array() .cast(DType::Primitive(PType::U32, Nullability::Nullable)) @@ -173,6 +176,7 @@ mod test { assert!(matches!(p.validity(), Ok(Validity::AllValid))); // to non-nullable u8 + #[expect(deprecated)] let p = p .into_array() .cast(DType::Primitive(PType::U8, Nullability::NonNullable)) @@ -183,17 +187,17 @@ mod test { } #[test] - #[expect(deprecated)] fn cast_u32_f32() { let arr = buffer![0u32, 10, 200].into_array(); + #[expect(deprecated)] let u8arr = arr.cast(PType::F32.into()).unwrap().to_primitive(); assert_arrays_eq!(u8arr, PrimitiveArray::from_iter([0.0f32, 10., 200.])); } #[test] - #[expect(deprecated)] fn cast_i32_u32() { let arr = buffer![-1i32].into_array(); + #[expect(deprecated)] let error = arr .cast(PType::U32.into()) .and_then(|a| a.to_canonical().map(|c| c.into_array())) @@ -203,9 +207,9 @@ mod test { } #[test] - #[expect(deprecated)] fn cast_array_with_nulls_to_nonnullable() { let arr = PrimitiveArray::from_option_iter([Some(-1i32), None, Some(10)]); + #[expect(deprecated)] let err = arr .into_array() .cast(PType::I32.into()) @@ -220,12 +224,12 @@ mod test { } #[test] - #[expect(deprecated)] fn cast_with_invalid_nulls() { let arr = PrimitiveArray::new( buffer![-1i32, 0, 10], Validity::from_iter([false, true, true]), ); + #[expect(deprecated)] let p = arr .into_array() .cast(DType::Primitive(PType::U32, Nullability::Nullable)) @@ -248,11 +252,11 @@ mod test { /// Same-width integer cast where all values fit: should reinterpret the /// buffer without allocation (pointer identity). #[test] - #[expect(deprecated)] fn cast_same_width_int_reinterprets_buffer() -> vortex_error::VortexResult<()> { let src = PrimitiveArray::from_iter([0u32, 10, 100]); let src_ptr = src.as_slice::().as_ptr(); + #[expect(deprecated)] let dst = src.into_array().cast(PType::I32.into())?.to_primitive(); let dst_ptr = dst.as_slice::().as_ptr(); @@ -265,9 +269,9 @@ mod test { /// Same-width integer cast where values don't fit: should fall through /// to the allocating path and produce an error. #[test] - #[expect(deprecated)] fn cast_same_width_int_out_of_range_errors() { let arr = buffer![u32::MAX].into_array(); + #[expect(deprecated)] let err = arr .cast(PType::I32.into()) .and_then(|a| a.to_canonical().map(|c| c.into_array())) @@ -278,9 +282,9 @@ mod test { /// All-null array cast between same-width types should succeed without /// touching the buffer contents. #[test] - #[expect(deprecated)] fn cast_same_width_all_null() -> vortex_error::VortexResult<()> { let arr = PrimitiveArray::new(buffer![0xFFu8, 0xFF], Validity::AllInvalid); + #[expect(deprecated)] let casted = arr .into_array() .cast(DType::Primitive(PType::I8, Nullability::Nullable))? @@ -293,7 +297,6 @@ mod test { /// Same-width integer cast with nullable values: out-of-range nulls should /// not prevent the cast from succeeding. #[test] - #[expect(deprecated)] fn cast_same_width_int_nullable_with_out_of_range_nulls() -> vortex_error::VortexResult<()> { // The null position holds u32::MAX which doesn't fit in i32, but it's // masked as invalid so the cast should still succeed via reinterpret. @@ -301,6 +304,7 @@ mod test { buffer![u32::MAX, 0u32, 42u32], Validity::from_iter([false, true, true]), ); + #[expect(deprecated)] let casted = arr .into_array() .cast(DType::Primitive(PType::I32, Nullability::Nullable))? @@ -313,12 +317,12 @@ mod test { } #[test] - #[expect(deprecated)] fn cast_u32_to_u8_with_out_of_range_nulls() -> vortex_error::VortexResult<()> { let arr = PrimitiveArray::new( buffer![1000u32, 10u32, 42u32], Validity::from_iter([false, true, true]), ); + #[expect(deprecated)] let casted = arr .into_array() .cast(DType::Primitive(PType::U8, Nullability::Nullable))? diff --git a/vortex-array/src/arrays/primitive/compute/fill_null.rs b/vortex-array/src/arrays/primitive/compute/fill_null.rs index 09b3fa1d57a..5862874a37d 100644 --- a/vortex-array/src/arrays/primitive/compute/fill_null.rs +++ b/vortex-array/src/arrays/primitive/compute/fill_null.rs @@ -63,9 +63,9 @@ mod test { use crate::validity::Validity; #[test] - #[expect(deprecated)] fn fill_null_leading_none() { let arr = PrimitiveArray::from_option_iter([None, Some(8u8), None, Some(10), None]); + #[expect(deprecated)] let p = arr .into_array() .fill_null(Scalar::from(42u8)) @@ -83,10 +83,10 @@ mod test { } #[test] - #[expect(deprecated)] fn fill_null_all_none() { let arr = PrimitiveArray::from_option_iter([Option::::None, None, None, None, None]); + #[expect(deprecated)] let p = arr .into_array() .fill_null(Scalar::from(255u8)) @@ -104,12 +104,12 @@ mod test { } #[test] - #[expect(deprecated)] fn fill_null_nullable_non_null() { let arr = PrimitiveArray::new( buffer![8u8, 10, 12, 14, 16], Validity::Array(BoolArray::from_iter([true, true, true, true, true]).into_array()), ); + #[expect(deprecated)] let p = arr .into_array() .fill_null(Scalar::from(255u8)) @@ -127,9 +127,9 @@ mod test { } #[test] - #[expect(deprecated)] fn fill_null_non_nullable() { let arr = buffer![8u8, 10, 12, 14, 16].into_array(); + #[expect(deprecated)] let p = arr.fill_null(Scalar::from(255u8)).unwrap().to_primitive(); assert_arrays_eq!(p, PrimitiveArray::from_iter([8u8, 10, 12, 14, 16])); assert!( diff --git a/vortex-array/src/arrays/struct_/compute/cast.rs b/vortex-array/src/arrays/struct_/compute/cast.rs index fe748d21200..6c9a5f1edca 100644 --- a/vortex-array/src/arrays/struct_/compute/cast.rs +++ b/vortex-array/src/arrays/struct_/compute/cast.rs @@ -194,7 +194,6 @@ mod tests { } #[test] - #[expect(deprecated)] fn cast_duplicate_field_names_to_nullable() { let names = FieldNames::from(["a", "a"]); let field1 = buffer![1i32, 2, 3].into_array(); @@ -211,11 +210,12 @@ mod tests { .unwrap(); assert_eq!(result.dtype(), &target_dtype); assert_eq!(result.len(), 3); - assert_eq!(result.to_struct().struct_fields().nfields(), 2); + #[expect(deprecated)] + let nfields = result.to_struct().struct_fields().nfields(); + assert_eq!(nfields, 2); } #[test] - #[expect(deprecated)] fn cast_add_fields() { let names = FieldNames::from(["a", "b"]); let field1 = buffer![1i32, 2, 3].into_array(); @@ -241,6 +241,8 @@ mod tests { .unwrap(); assert_eq!(result.dtype(), &target_dtype); assert_eq!(result.len(), 3); - assert_eq!(result.to_struct().struct_fields().nfields(), 3); + #[expect(deprecated)] + let nfields = result.to_struct().struct_fields().nfields(); + assert_eq!(nfields, 3); } } diff --git a/vortex-array/src/arrays/struct_/compute/rules.rs b/vortex-array/src/arrays/struct_/compute/rules.rs index 881c9661c2c..8a802969d39 100644 --- a/vortex-array/src/arrays/struct_/compute/rules.rs +++ b/vortex-array/src/arrays/struct_/compute/rules.rs @@ -164,7 +164,6 @@ mod tests { use crate::validity::Validity; #[test] - #[expect(deprecated)] fn test_struct_cast_field_reorder() { // Source: {a, b}, Target: {c, b, a} - reordered + new null field let source = StructArray::try_new( @@ -189,6 +188,7 @@ mod tests { // Use `ArrayBuiltins::cast` which goes through the optimizer and applies // `StructCastPushDownRule`. + #[expect(deprecated)] let result = source.into_array().cast(target).unwrap().to_struct(); assert_arrays_eq!( result.unmasked_field_by_name("a").unwrap(), @@ -232,7 +232,6 @@ mod tests { } #[test] - #[expect(deprecated)] fn cast_struct_drop_field() { // Casting to a struct with a subset of fields should succeed. let source = StructArray::try_new( @@ -258,6 +257,7 @@ mod tests { Nullability::NonNullable, ); + #[expect(deprecated)] let result = source.into_array().cast(target).unwrap().to_struct(); assert_eq!(result.unmasked_fields().len(), 2); assert_arrays_eq!( @@ -271,7 +271,6 @@ mod tests { } #[test] - #[expect(deprecated)] fn cast_struct_field_type_widening() { // Casting struct fields to wider types (i32 -> i64). let source = StructArray::try_new( @@ -290,6 +289,7 @@ mod tests { Nullability::NonNullable, ); + #[expect(deprecated)] let result = source.into_array().cast(target).unwrap().to_struct(); assert_eq!( result.unmasked_field_by_name("val").unwrap().dtype(), diff --git a/vortex-array/src/arrays/varbin/accessor.rs b/vortex-array/src/arrays/varbin/accessor.rs index a68ee3fdea1..ee68f94bd55 100644 --- a/vortex-array/src/arrays/varbin/accessor.rs +++ b/vortex-array/src/arrays/varbin/accessor.rs @@ -14,11 +14,11 @@ use crate::match_each_integer_ptype; use crate::validity::Validity; impl ArrayAccessor<[u8]> for VarBinArray { - #[expect(deprecated)] fn with_iterator(&self, f: F) -> R where F: for<'a> FnOnce(&mut dyn Iterator>) -> R, { + #[expect(deprecated)] let offsets = self.offsets().to_primitive(); let validity = self .validity() @@ -40,6 +40,7 @@ impl ArrayAccessor<[u8]> for VarBinArray { } Validity::AllInvalid => f(&mut iter::repeat_n(None, self.len())), Validity::Array(v) => { + #[expect(deprecated)] let validity = v.to_bool().into_bit_buffer(); let mut iter = offsets .windows(2) diff --git a/vortex-array/src/arrays/varbin/array.rs b/vortex-array/src/arrays/varbin/array.rs index a92f096d8ca..8d22f2ea451 100644 --- a/vortex-array/src/arrays/varbin/array.rs +++ b/vortex-array/src/arrays/varbin/array.rs @@ -178,7 +178,6 @@ impl VarBinData { /// Validates the components that would be used to create a `VarBinArray`. /// /// This function checks all the invariants required by `VarBinArray::new_unchecked`. - #[expect(deprecated)] pub fn validate( offsets: &ArrayRef, bytes: &BufferHandle, @@ -247,6 +246,7 @@ impl VarBinData { && matches!(dtype, DType::Utf8(_)) && let Some(bytes) = bytes.as_host_opt() { + #[expect(deprecated)] let primitive_offsets = offsets.to_primitive(); match_each_integer_ptype!(primitive_offsets.dtype().as_ptype(), |O| { let offsets_slice = primitive_offsets.as_slice::(); diff --git a/vortex-array/src/arrays/varbin/compute/compare.rs b/vortex-array/src/arrays/varbin/compute/compare.rs index e6b19b2c046..963e67fdde5 100644 --- a/vortex-array/src/arrays/varbin/compute/compare.rs +++ b/vortex-array/src/arrays/varbin/compute/compare.rs @@ -160,12 +160,12 @@ mod test { use crate::scalar_fn::fns::operators::Operator; #[test] - #[expect(deprecated)] fn test_binary_compare() { let array = VarBinArray::from_iter( [Some(b"abc".to_vec()), None, Some(b"def".to_vec())], DType::Binary(Nullability::Nullable), ); + #[expect(deprecated)] let result = array .into_array() .binary( @@ -199,7 +199,6 @@ mod test { } #[test] - #[expect(deprecated)] fn varbinview_compare() { let array = VarBinArray::from_iter( [Some(b"abc".to_vec()), None, Some(b"def".to_vec())], @@ -209,6 +208,7 @@ mod test { [None, None, Some(b"def".to_vec())], DType::Binary(Nullability::Nullable), ); + #[expect(deprecated)] let result = array .into_array() .binary(vbv.into_array(), Operator::Eq) diff --git a/vortex-array/src/arrays/varbinview/accessor.rs b/vortex-array/src/arrays/varbinview/accessor.rs index 72cc910ee6b..cd42c3f2b58 100644 --- a/vortex-array/src/arrays/varbinview/accessor.rs +++ b/vortex-array/src/arrays/varbinview/accessor.rs @@ -12,7 +12,6 @@ use crate::arrays::VarBinViewArray; use crate::validity::Validity; impl ArrayAccessor<[u8]> for VarBinViewArray { - #[expect(deprecated)] fn with_iterator FnOnce(&mut dyn Iterator>) -> R, R>( &self, f: F, @@ -41,6 +40,7 @@ impl ArrayAccessor<[u8]> for VarBinViewArray { } Validity::AllInvalid => f(&mut iter::repeat_n(None, views.len())), Validity::Array(v) => { + #[expect(deprecated)] let validity = v.to_bool().into_bit_buffer(); let mut iter = views.iter().zip(validity.iter()).map(|(view, valid)| { if valid { diff --git a/vortex-array/src/arrays/varbinview/compute/mod.rs b/vortex-array/src/arrays/varbinview/compute/mod.rs index 7673c88b8e7..b69efad1e88 100644 --- a/vortex-array/src/arrays/varbinview/compute/mod.rs +++ b/vortex-array/src/arrays/varbinview/compute/mod.rs @@ -18,7 +18,6 @@ mod tests { #[expect(deprecated)] use crate::canonical::ToCanonical as _; #[test] - #[expect(deprecated)] fn take_nullable() { let arr = VarBinViewArray::from_iter_nullable_str([ Some("one"), @@ -32,12 +31,12 @@ mod tests { let taken = arr.take(buffer![0, 3].into_array()).unwrap(); assert!(taken.dtype().is_nullable()); - assert_eq!( - taken.to_varbinview().with_iterator(|it| it - .map(|v| v.map(|b| unsafe { String::from_utf8_unchecked(b.to_vec()) })) - .collect::>()), - [Some("one".to_string()), Some("four".to_string())] - ); + #[expect(deprecated)] + let result = taken.to_varbinview().with_iterator(|it| { + it.map(|v| v.map(|b| unsafe { String::from_utf8_unchecked(b.to_vec()) })) + .collect::>() + }); + assert_eq!(result, [Some("one".to_string()), Some("four".to_string())]); } // Consistency tests use rstest::rstest; diff --git a/vortex-array/src/arrays/varbinview/compute/take.rs b/vortex-array/src/arrays/varbinview/compute/take.rs index f1bdb7c433d..ff3d9052b0b 100644 --- a/vortex-array/src/arrays/varbinview/compute/take.rs +++ b/vortex-array/src/arrays/varbinview/compute/take.rs @@ -103,7 +103,6 @@ mod tests { use crate::validity::Validity; #[test] - #[expect(deprecated)] fn take_nullable() { let arr = VarBinViewArray::from_iter_nullable_str([ Some("one"), @@ -117,16 +116,15 @@ mod tests { let taken = arr.take(buffer![0, 3].into_array()).unwrap(); assert!(taken.dtype().is_nullable()); - assert_eq!( - taken.to_varbinview().with_iterator(|it| it - .map(|v| v.map(|b| unsafe { String::from_utf8_unchecked(b.to_vec()) })) - .collect::>()), - [Some("one".to_string()), Some("four".to_string())] - ); + #[expect(deprecated)] + let result = taken.to_varbinview().with_iterator(|it| { + it.map(|v| v.map(|b| unsafe { String::from_utf8_unchecked(b.to_vec()) })) + .collect::>() + }); + assert_eq!(result, [Some("one".to_string()), Some("four".to_string())]); } #[test] - #[expect(deprecated)] fn take_nullable_indices() { let arr = VarBinViewArray::from_iter(["one", "two"].map(Some), DType::Utf8(NonNullable)); @@ -139,12 +137,12 @@ mod tests { let taken = arr.take(indices.into_array()).unwrap(); assert!(taken.dtype().is_nullable()); - assert_eq!( - taken.to_varbinview().with_iterator(|it| it - .map(|v| v.map(|b| unsafe { String::from_utf8_unchecked(b.to_vec()) })) - .collect::>()), - [Some("two".to_string()), None] - ); + #[expect(deprecated)] + let result = taken.to_varbinview().with_iterator(|it| { + it.map(|v| v.map(|b| unsafe { String::from_utf8_unchecked(b.to_vec()) })) + .collect::>() + }); + assert_eq!(result, [Some("two".to_string()), None]); } #[rstest] diff --git a/vortex-array/src/arrays/varbinview/compute/zip.rs b/vortex-array/src/arrays/varbinview/compute/zip.rs index 12dea3d31a9..2be832b500f 100644 --- a/vortex-array/src/arrays/varbinview/compute/zip.rs +++ b/vortex-array/src/arrays/varbinview/compute/zip.rs @@ -220,7 +220,6 @@ mod tests { use crate::dtype::Nullability; #[test] - #[expect(deprecated)] fn zip_varbinview_kernel_zips() { let a = VarBinViewArray::from_iter( [ @@ -248,6 +247,7 @@ mod tests { let mask = Mask::from_iter([true, false, true, false, false, true]); + #[expect(deprecated)] let zipped = mask .clone() .into_array() diff --git a/vortex-array/src/arrays/varbinview/tests.rs b/vortex-array/src/arrays/varbinview/tests.rs index b9cdfd11bb4..2892ff16283 100644 --- a/vortex-array/src/arrays/varbinview/tests.rs +++ b/vortex-array/src/arrays/varbinview/tests.rs @@ -30,9 +30,9 @@ pub fn slice_array() { } #[test] -#[expect(deprecated)] pub fn flatten_array() { let binary_arr = VarBinViewArray::from_iter_str(["string1", "string2"]); + #[expect(deprecated)] let var_bin = binary_arr.as_array().to_varbinview(); assert_arrays_eq!( var_bin, diff --git a/vortex-array/src/arrow/record_batch.rs b/vortex-array/src/arrow/record_batch.rs index f3a66b3a64c..a9edd7ee624 100644 --- a/vortex-array/src/arrow/record_batch.rs +++ b/vortex-array/src/arrow/record_batch.rs @@ -23,9 +23,10 @@ use crate::validity::Validity; impl TryFrom<&ArrayRef> for RecordBatch { type Error = VortexError; - #[expect(deprecated)] fn try_from(value: &ArrayRef) -> VortexResult { - let Canonical::Struct(struct_array) = value.to_canonical()? else { + #[expect(deprecated)] + let canonical = value.to_canonical()?; + let Canonical::Struct(struct_array) = canonical else { vortex_bail!("RecordBatch can only be constructed from ") }; diff --git a/vortex-array/src/builders/bool.rs b/vortex-array/src/builders/bool.rs index ad45f6a12d2..0e784aca67d 100644 --- a/vortex-array/src/builders/bool.rs +++ b/vortex-array/src/builders/bool.rs @@ -115,8 +115,8 @@ impl ArrayBuilder for BoolBuilder { Ok(()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let bool_array = array.to_bool(); self.inner.append_buffer(&bool_array.to_bit_buffer()); @@ -193,7 +193,6 @@ mod tests { .into_array() } - #[expect(deprecated)] #[test] fn tests() -> VortexResult<()> { let len = 1000; @@ -206,7 +205,9 @@ mod tests { .clone() .append_to_builder(builder.as_mut(), &mut ctx)?; + #[expect(deprecated)] let canon_into = builder.finish().to_bool(); + #[expect(deprecated)] let into_canon = chunk.to_bool(); assert!( diff --git a/vortex-array/src/builders/decimal.rs b/vortex-array/src/builders/decimal.rs index 6d619b7e5cb..90c077b083c 100644 --- a/vortex-array/src/builders/decimal.rs +++ b/vortex-array/src/builders/decimal.rs @@ -195,8 +195,8 @@ impl ArrayBuilder for DecimalBuilder { Ok(()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let decimal_array = array.to_decimal(); match_each_decimal_value_type!(decimal_array.values_type(), |D| { diff --git a/vortex-array/src/builders/dict/bytes.rs b/vortex-array/src/builders/dict/bytes.rs index ff15bfcc69f..d66870d6ba5 100644 --- a/vortex-array/src/builders/dict/bytes.rs +++ b/vortex-array/src/builders/dict/bytes.rs @@ -214,16 +214,16 @@ mod test { use crate::arrays::dict::DictArraySlotsExt; use crate::builders::dict::dict_encode; - #[expect(deprecated)] #[test] fn encode_varbin() { let arr = VarBinArray::from(vec!["hello", "world", "hello", "again", "world"]); let dict = dict_encode(&arr.into_array()).unwrap(); - assert_eq!( - dict.codes().to_primitive().as_slice::(), - &[0, 1, 0, 2, 1] - ); - dict.values().to_varbinview().with_iterator(|iter| { + #[expect(deprecated)] + let codes = dict.codes().to_primitive(); + assert_eq!(codes.as_slice::(), &[0, 1, 0, 2, 1]); + #[expect(deprecated)] + let values = dict.values().to_varbinview(); + values.with_iterator(|iter| { assert_eq!( iter.flatten() .map(|b| unsafe { str::from_utf8_unchecked(b) }) @@ -233,7 +233,6 @@ mod test { }); } - #[expect(deprecated)] #[test] fn encode_varbin_nulls() { let arr: VarBinArray = vec![ @@ -249,11 +248,12 @@ mod test { .into_iter() .collect(); let dict = dict_encode(&arr.into_array()).unwrap(); - assert_eq!( - dict.codes().to_primitive().as_slice::(), - &[0, 1, 2, 0, 1, 3, 2, 1] - ); - dict.values().to_varbinview().with_iterator(|iter| { + #[expect(deprecated)] + let codes = dict.codes().to_primitive(); + assert_eq!(codes.as_slice::(), &[0, 1, 2, 0, 1, 3, 2, 1]); + #[expect(deprecated)] + let values = dict.values().to_varbinview(); + values.with_iterator(|iter| { assert_eq!( iter.map(|b| b.map(|v| unsafe { str::from_utf8_unchecked(v) })) .collect::>(), @@ -262,12 +262,13 @@ mod test { }); } - #[expect(deprecated)] #[test] fn repeated_values() { let arr = VarBinArray::from(vec!["a", "a", "b", "b", "a", "b", "a", "b"]); let dict = dict_encode(&arr.into_array()).unwrap(); - dict.values().to_varbinview().with_iterator(|iter| { + #[expect(deprecated)] + let values = dict.values().to_varbinview(); + values.with_iterator(|iter| { assert_eq!( iter.flatten() .map(|b| unsafe { str::from_utf8_unchecked(b) }) @@ -275,9 +276,8 @@ mod test { vec!["a", "b"] ); }); - assert_eq!( - dict.codes().to_primitive().as_slice::(), - &[0, 0, 1, 1, 0, 1, 0, 1] - ); + #[expect(deprecated)] + let codes = dict.codes().to_primitive(); + assert_eq!(codes.as_slice::(), &[0, 0, 1, 1, 0, 1, 0, 1]); } } diff --git a/vortex-array/src/builders/dict/mod.rs b/vortex-array/src/builders/dict/mod.rs index fe8176afb70..7cfcfbbfb8a 100644 --- a/vortex-array/src/builders/dict/mod.rs +++ b/vortex-array/src/builders/dict/mod.rs @@ -67,8 +67,9 @@ pub fn dict_encode_with_constraints( constraints: &DictConstraints, ) -> VortexResult { let mut encoder = dict_encoder(array, constraints); + let encoded = encoder.encode(array); #[expect(deprecated)] - let codes = encoder.encode(array).to_primitive().narrow()?; + let codes = encoded.to_primitive().narrow()?; // SAFETY: The encoding process will produce a value set of codes and values // All values in the dictionary are guaranteed to be referenced by at least one code // since we build the dictionary from the codes we observe during encoding diff --git a/vortex-array/src/builders/dict/primitive.rs b/vortex-array/src/builders/dict/primitive.rs index 566ecbdd901..03d930dbef1 100644 --- a/vortex-array/src/builders/dict/primitive.rs +++ b/vortex-array/src/builders/dict/primitive.rs @@ -123,11 +123,12 @@ where NativeValue: Hash + Eq, Code: UnsignedPType, { - #[expect(deprecated)] fn encode(&mut self, array: &ArrayRef) -> ArrayRef { let mut codes = BufferMut::::with_capacity(array.len()); - array.to_primitive().with_iterator(|it| { + #[expect(deprecated)] + let prim = array.to_primitive(); + prim.with_iterator(|it| { for value in it { let Some(code) = self.encode_value(value.copied()) else { break; diff --git a/vortex-array/src/builders/extension.rs b/vortex-array/src/builders/extension.rs index 72b56b6040f..d947877e297 100644 --- a/vortex-array/src/builders/extension.rs +++ b/vortex-array/src/builders/extension.rs @@ -99,8 +99,8 @@ impl ArrayBuilder for ExtensionBuilder { self.append_value(scalar.as_extension()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let ext_array = array.to_extension(); self.storage.extend_from_array(ext_array.storage_array()) } diff --git a/vortex-array/src/builders/fixed_size_list.rs b/vortex-array/src/builders/fixed_size_list.rs index db7e4b416c1..36024f04340 100644 --- a/vortex-array/src/builders/fixed_size_list.rs +++ b/vortex-array/src/builders/fixed_size_list.rs @@ -237,8 +237,8 @@ impl ArrayBuilder for FixedSizeListBuilder { /// This will increase the capacity if extending with this `array` would go past the original /// capacity. - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let fsl = array.to_fixed_size_list(); if fsl.is_empty() { return; @@ -307,7 +307,6 @@ mod tests { assert_eq!(fsl.len(), 0); } - #[expect(deprecated)] #[test] fn test_values() { let dtype: Arc = Arc::new(I32.into()); @@ -339,12 +338,12 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 2); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.elements().len(), 6); assert_eq!(fsl_array.list_size(), 3); } - #[expect(deprecated)] #[test] fn test_degenerate_size_zero_non_nullable() { let dtype: Arc = Arc::new(I32.into()); @@ -363,13 +362,13 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 100); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 0); // The elements array should be empty since list_size is 0. assert_eq!(fsl_array.elements().len(), 0); } - #[expect(deprecated)] #[test] fn test_degenerate_size_zero_nullable() { // Use nullable elements since we'll be appending nulls @@ -393,12 +392,12 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 100); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 0); assert_eq!(fsl_array.elements().len(), 0); } - #[expect(deprecated)] #[test] fn test_capacity_growth() { let dtype: Arc = Arc::new(I32.into()); @@ -423,11 +422,11 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 5); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.elements().len(), 10); } - #[expect(deprecated)] #[test] fn test_large_size_zero_capacity_empty_result() { let dtype: Arc = Arc::new(I32.into()); @@ -437,12 +436,12 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 0); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 100000000); assert_eq!(fsl_array.elements().len(), 0); } - #[expect(deprecated)] #[test] fn test_nullable_lists_non_nullable_elements() { let dtype: Arc = Arc::new(DType::Primitive(I32, NonNullable)); @@ -470,6 +469,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 3); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert!( fsl_array @@ -494,7 +494,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_non_nullable_lists_nullable_elements() { let dtype: Arc = Arc::new(DType::Primitive(I32, Nullable)); @@ -534,11 +533,11 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 2); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.elements().len(), 6); } - #[expect(deprecated)] #[test] fn test_append_zeros() { let dtype: Arc = Arc::new(I32.into()); @@ -549,17 +548,18 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 5); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 3); assert_eq!(fsl_array.elements().len(), 15); // Check that all elements are zeros. + #[expect(deprecated)] let elements_array = fsl_array.elements().to_primitive(); let elements = elements_array.as_slice::(); assert!(elements.iter().all(|&x| x == 0)); } - #[expect(deprecated)] #[test] fn test_append_nulls() { // Elements must be nullable if we're going to append null lists @@ -573,6 +573,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 3); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 2); @@ -588,7 +589,6 @@ mod tests { } } - #[expect(deprecated)] #[test] fn test_append_scalar_nulls() { // Elements must be nullable if we're going to append null lists @@ -604,6 +604,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 1); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 2); @@ -617,7 +618,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_append_zeros_degenerate() { let dtype: Arc = Arc::new(I32.into()); @@ -630,6 +630,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 1000); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 0); assert_eq!(fsl_array.elements().len(), 0); @@ -660,7 +661,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_extend_from_array() { let dtype: Arc = Arc::new(I32.into()); @@ -682,6 +682,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 6); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.elements().len(), 12); @@ -730,7 +731,6 @@ mod tests { ); } - #[expect(deprecated)] #[test] fn test_extend_degenerate_arrays() { let dtype: Arc = Arc::new(I32.into()); @@ -758,6 +758,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 5); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.list_size(), 0); assert_eq!(fsl_array.elements().len(), 0); @@ -834,7 +835,6 @@ mod tests { assert_eq!(fsl.len(), 1); } - #[expect(deprecated)] #[test] fn test_mixed_operations() { // Use nullable elements since we'll be appending nulls @@ -871,6 +871,7 @@ mod tests { let fsl = builder.finish(); assert_eq!(fsl.len(), 6); + #[expect(deprecated)] let fsl_array = fsl.to_fixed_size_list(); assert_eq!(fsl_array.elements().len(), 12); @@ -991,7 +992,6 @@ mod tests { assert!(builder.append_scalar(&wrong_scalar).is_err()); } - #[expect(deprecated)] #[test] fn test_append_array_as_list() { let dtype: Arc = Arc::new(I32.into()); @@ -1035,6 +1035,7 @@ mod tests { assert_eq!(fsl.list_size(), 3); // Verify elements array: [1, 2, 3, 10, 11, 12, 4, 5, 6, 20, 21, 22]. + #[expect(deprecated)] let elements = fsl.elements().to_primitive(); assert_eq!( elements.as_slice::(), diff --git a/vortex-array/src/builders/list.rs b/vortex-array/src/builders/list.rs index 7f91248cc97..8e2c0e8283b 100644 --- a/vortex-array/src/builders/list.rs +++ b/vortex-array/src/builders/list.rs @@ -217,8 +217,8 @@ impl ArrayBuilder for ListBuilder { self.append_value(scalar.as_list()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let list = array.to_listview(); if list.is_empty() { return; @@ -235,7 +235,9 @@ impl ArrayBuilder for ListBuilder { // Note that `ListViewArray` has `n` offsets and sizes, not `n+1` offsets like `ListArray`. let elements = list.elements(); + #[expect(deprecated)] let offsets = list.offsets().to_primitive(); + #[expect(deprecated)] let sizes = list.sizes().to_primitive(); fn extend_inner( @@ -306,9 +308,10 @@ impl ArrayBuilder for ListBuilder { self.finish_into_list().into_array() } - #[expect(deprecated)] fn finish_into_canonical(&mut self) -> Canonical { - Canonical::List(self.finish_into_list().into_array().to_listview()) + #[expect(deprecated)] + let listview = self.finish_into_list().into_array().to_listview(); + Canonical::List(listview) } } @@ -350,7 +353,6 @@ mod tests { assert_eq!(list.len(), 0); } - #[expect(deprecated)] #[test] fn test_values() { let dtype: Arc = Arc::new(I32.into()); @@ -381,6 +383,7 @@ mod tests { let list = builder.finish(); assert_eq!(list.len(), 2); + #[expect(deprecated)] let list_array = list.to_listview(); assert_eq!(list_array.list_elements_at(0).unwrap().len(), 3); @@ -399,7 +402,6 @@ mod tests { ) } - #[expect(deprecated)] #[test] fn test_nullable_values() { let dtype: Arc = Arc::new(I32.into()); @@ -434,6 +436,7 @@ mod tests { let list = builder.finish(); assert_eq!(list.len(), 3); + #[expect(deprecated)] let list_array = list.to_listview(); assert_eq!(list_array.list_elements_at(0).unwrap().len(), 3); @@ -441,7 +444,6 @@ mod tests { assert_eq!(list_array.list_elements_at(2).unwrap().len(), 3); } - #[expect(deprecated)] fn test_extend_builder_gen() { let list = ListArray::from_iter_opt_slow::( [Some(vec![0, 1, 2]), None, Some(vec![4, 5])], @@ -458,6 +460,7 @@ mod tests { builder.extend_from_array(&list.slice(0..0).unwrap()); builder.extend_from_array(&list.slice(1..3).unwrap()); + #[expect(deprecated)] let expected = ListArray::from_iter_opt_slow::( [ Some(vec![0, 1, 2]), @@ -507,7 +510,6 @@ mod tests { test_extend_builder_gen::(); } - #[expect(deprecated)] #[test] pub fn test_array_with_gap() { let one_trailing_unused_element = ListArray::try_new( @@ -532,6 +534,7 @@ mod tests { DType::List(Arc::new(DType::Primitive(I32, NonNullable)), NonNullable), ); + #[expect(deprecated)] let canon_values = chunked_list.unwrap().as_array().to_listview(); assert_eq!( diff --git a/vortex-array/src/builders/listview.rs b/vortex-array/src/builders/listview.rs index fe470f0a0ab..d8217729996 100644 --- a/vortex-array/src/builders/listview.rs +++ b/vortex-array/src/builders/listview.rs @@ -293,8 +293,8 @@ impl ArrayBuilder for ListViewBuilder { self.append_value(list_scalar) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let listview = array.to_listview(); if listview.is_empty() { return; @@ -343,6 +343,7 @@ impl ArrayBuilder for ListViewBuilder { let uninit_range = self.offsets_builder.uninit_range(extend_length); // This should be cheap because we didn't compress after rebuilding. + #[expect(deprecated)] let new_offsets = listview.offsets().to_primitive(); match_each_integer_ptype!(new_offsets.ptype(), |A| { diff --git a/vortex-array/src/builders/primitive.rs b/vortex-array/src/builders/primitive.rs index 438bd9262f3..8d422ac7d2c 100644 --- a/vortex-array/src/builders/primitive.rs +++ b/vortex-array/src/builders/primitive.rs @@ -177,8 +177,8 @@ impl ArrayBuilder for PrimitiveBuilder { Ok(()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let array = array.to_primitive(); // This should be checked in `extend_from_array` but we can check it again. diff --git a/vortex-array/src/builders/struct_.rs b/vortex-array/src/builders/struct_.rs index a05eac2facb..b9832bba2a5 100644 --- a/vortex-array/src/builders/struct_.rs +++ b/vortex-array/src/builders/struct_.rs @@ -168,8 +168,8 @@ impl ArrayBuilder for StructBuilder { self.append_value(scalar.as_struct()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let array = array.to_struct(); for (a, builder) in array diff --git a/vortex-array/src/builders/tests.rs b/vortex-array/src/builders/tests.rs index 694e8f2734d..a46f97f1966 100644 --- a/vortex-array/src/builders/tests.rs +++ b/vortex-array/src/builders/tests.rs @@ -221,7 +221,6 @@ fn test_append_defaults_behavior(#[case] dtype: DType, #[case] should_be_null: b /// Helper function that fills two builders with the same values and compares the results /// of `to_canonical()` vs `finish().to_canonical()`. -#[expect(deprecated)] fn compare_to_canonical_methods(dtype: &DType, mut fill_builder: F) where F: FnMut(&mut dyn ArrayBuilder), @@ -238,6 +237,7 @@ where // Get canonical arrays using both methods. let canonical_direct = builder1.finish_into_canonical(); + #[expect(deprecated)] let canonical_indirect = builder2 .finish() .to_canonical() diff --git a/vortex-array/src/builders/varbinview.rs b/vortex-array/src/builders/varbinview.rs index 1dbbecc4609..c125e5086fe 100644 --- a/vortex-array/src/builders/varbinview.rs +++ b/vortex-array/src/builders/varbinview.rs @@ -294,8 +294,8 @@ impl ArrayBuilder for VarBinViewBuilder { Ok(()) } - #[expect(deprecated)] unsafe fn extend_from_array_unchecked(&mut self, array: &ArrayRef) { + #[expect(deprecated)] let array = array.to_varbinview(); self.flush_in_progress(); diff --git a/vortex-array/src/canonical.rs b/vortex-array/src/canonical.rs index 84c03dcfaaa..e8edd0488fc 100644 --- a/vortex-array/src/canonical.rs +++ b/vortex-array/src/canonical.rs @@ -472,67 +472,58 @@ pub trait ToCanonical { // Blanket impl for all Array encodings. #[expect(deprecated)] impl ToCanonical for ArrayRef { - #[expect(deprecated)] fn to_null(&self) -> NullArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_null() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_null() } - #[expect(deprecated)] fn to_bool(&self) -> BoolArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_bool() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_bool() } - #[expect(deprecated)] fn to_primitive(&self) -> PrimitiveArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_primitive() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_primitive() } - #[expect(deprecated)] fn to_decimal(&self) -> DecimalArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_decimal() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_decimal() } - #[expect(deprecated)] fn to_struct(&self) -> StructArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_struct() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_struct() } - #[expect(deprecated)] fn to_listview(&self) -> ListViewArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_listview() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_listview() } - #[expect(deprecated)] fn to_fixed_size_list(&self) -> FixedSizeListArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_fixed_size_list() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_fixed_size_list() } - #[expect(deprecated)] fn to_varbinview(&self) -> VarBinViewArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_varbinview() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_varbinview() } - #[expect(deprecated)] fn to_extension(&self) -> ExtensionArray { - self.to_canonical() - .vortex_expect("to_canonical failed") - .into_extension() + #[expect(deprecated)] + let result = self.to_canonical().vortex_expect("to_canonical failed"); + result.into_extension() } } diff --git a/vortex-array/src/compute/conformance/binary_numeric.rs b/vortex-array/src/compute/conformance/binary_numeric.rs index 3d423c78bd0..ce3eba940df 100644 --- a/vortex-array/src/compute/conformance/binary_numeric.rs +++ b/vortex-array/src/compute/conformance/binary_numeric.rs @@ -89,11 +89,11 @@ where test_binary_numeric_edge_cases(array); } -#[expect(deprecated)] fn test_standard_binary_numeric(array: ArrayRef) where Scalar: From, { + #[expect(deprecated)] let canonicalized_array = array.to_primitive(); let original_values = to_vec_of_scalar(&canonicalized_array.into_array()); @@ -325,12 +325,12 @@ where test_binary_numeric_with_scalar(array, T::neg_infinity()); } -#[expect(deprecated)] fn test_binary_numeric_with_scalar(array: ArrayRef, scalar_value: T) where T: NativePType + Num + Copy + std::fmt::Debug, Scalar: From, { + #[expect(deprecated)] let canonicalized_array = array.to_primitive(); let original_values = to_vec_of_scalar(&canonicalized_array.into_array()); diff --git a/vortex-array/src/compute/conformance/consistency.rs b/vortex-array/src/compute/conformance/consistency.rs index ee3b0dffe2c..a6d2996b091 100644 --- a/vortex-array/src/compute/conformance/consistency.rs +++ b/vortex-array/src/compute/conformance/consistency.rs @@ -1008,7 +1008,6 @@ fn test_boolean_demorgan_consistency(array: &ArrayRef) { /// # Why This Matters /// Aggregate operations on sliced arrays must produce correct results /// regardless of the underlying encoding's offset handling. -#[expect(deprecated)] fn test_slice_aggregate_consistency(array: &ArrayRef) { use crate::aggregate_fn::fns::min_max::min_max; use crate::aggregate_fn::fns::nan_count::nan_count; @@ -1030,6 +1029,7 @@ fn test_slice_aggregate_consistency(array: &ArrayRef) { let sliced = array .slice(start..end) .vortex_expect("slice should succeed in conformance test"); + #[expect(deprecated)] let canonical = array.to_canonical().vortex_expect("to_canonical failed"); let canonical_sliced = canonical .into_array() @@ -1120,7 +1120,6 @@ fn test_slice_aggregate_consistency(array: &ArrayRef) { /// This test specifically catches bugs where encodings (like RunEndArray) fail to preserve /// offset information during cast operations. Such bugs can lead to incorrect data being /// returned after casting a sliced array. -#[expect(deprecated)] fn test_cast_slice_consistency(array: &ArrayRef) { let len = array.len(); if len < 5 { @@ -1132,6 +1131,7 @@ fn test_cast_slice_consistency(array: &ArrayRef) { let end = 7.min(len - 2).max(start + 1); // Ensure we have at least 1 element // Get canonical form of the original array + #[expect(deprecated)] let canonical = array.to_canonical().vortex_expect("to_canonical failed"); // Choose appropriate target dtype based on the array's type @@ -1256,10 +1256,10 @@ fn test_cast_slice_consistency(array: &ArrayRef) { .vortex_expect("slice should succeed in conformance test"); // Try to cast the sliced array (force execution via to_canonical) - let slice_then_cast = match sliced - .cast(target_dtype.clone()) - .and_then(|a| a.to_canonical().map(|c| c.into_array())) - { + let slice_then_cast = match sliced.cast(target_dtype.clone()).and_then(|a| { + #[expect(deprecated)] + a.to_canonical().map(|c| c.into_array()) + }) { Ok(result) => result, Err(_) => continue, // Skip if cast fails }; @@ -1308,11 +1308,10 @@ fn test_cast_slice_consistency(array: &ArrayRef) { } // Also test the other way: cast then slice - let casted = match array - .clone() - .cast(target_dtype.clone()) - .and_then(|a| a.to_canonical().map(|c| c.into_array())) - { + let casted = match array.clone().cast(target_dtype.clone()).and_then(|a| { + #[expect(deprecated)] + a.to_canonical().map(|c| c.into_array()) + }) { Ok(result) => result, Err(_) => continue, // Skip if cast fails }; diff --git a/vortex-array/src/compute/conformance/take.rs b/vortex-array/src/compute/conformance/take.rs index 2f703700ca8..911a2ae7295 100644 --- a/vortex-array/src/compute/conformance/take.rs +++ b/vortex-array/src/compute/conformance/take.rs @@ -53,7 +53,6 @@ pub fn test_take_conformance(array: &ArrayRef) { } } -#[expect(deprecated)] fn test_take_all(array: &ArrayRef) { let len = array.len(); let indices = PrimitiveArray::from_iter(0..len as u64); @@ -65,14 +64,15 @@ fn test_take_all(array: &ArrayRef) { assert_eq!(result.dtype(), array.dtype()); // Verify elements match - match ( - array - .to_canonical() - .vortex_expect("to_canonical failed on array"), - result - .to_canonical() - .vortex_expect("to_canonical failed on result"), - ) { + #[expect(deprecated)] + let array_canonical = array + .to_canonical() + .vortex_expect("to_canonical failed on array"); + #[expect(deprecated)] + let result_canonical = result + .to_canonical() + .vortex_expect("to_canonical failed on result"); + match (array_canonical, result_canonical) { (Canonical::Primitive(orig_prim), Canonical::Primitive(result_prim)) => { assert_eq!( orig_prim.buffer_handle().to_host_sync(), diff --git a/vortex-array/src/display/mod.rs b/vortex-array/src/display/mod.rs index 30b441da819..04175c995c5 100644 --- a/vortex-array/src/display/mod.rs +++ b/vortex-array/src/display/mod.rs @@ -523,7 +523,6 @@ impl ArrayRef { DisplayArrayAs(self, DisplayOptions::TableDisplay) } - #[expect(deprecated)] fn fmt_as(&self, f: &mut std::fmt::Formatter, options: &DisplayOptions) -> std::fmt::Result { match options { DisplayOptions::MetadataOnly => EncodingSummaryExtractor::write(self, f), @@ -602,6 +601,7 @@ impl ArrayRef { return write!(f, "{table}"); }; + #[expect(deprecated)] let struct_ = self.to_struct(); builder.push_record(sf.names().iter().map(|name| name.to_string())); diff --git a/vortex-array/src/normalize.rs b/vortex-array/src/normalize.rs index 3afca054fa1..2833bf467d6 100644 --- a/vortex-array/src/normalize.rs +++ b/vortex-array/src/normalize.rs @@ -197,7 +197,6 @@ mod tests { } #[test] - #[expect(deprecated)] fn normalize_slice_of_dict_returns_dict() -> VortexResult<()> { let codes = PrimitiveArray::from_iter(vec![0u32, 1, 0, 1, 2]).into_array(); let values = PrimitiveArray::from_iter(vec![10i32, 20, 30]).into_array(); @@ -220,8 +219,10 @@ mod tests { assert_eq!(normalized.len(), 3); // Verify the data: codes [1,0,1] -> values [20, 10, 20] + #[expect(deprecated)] + let normalized_canonical = normalized.to_canonical()?; assert_arrays_eq!( - normalized.to_canonical()?, + normalized_canonical, PrimitiveArray::from_iter(vec![20i32, 10, 20]) ); diff --git a/vortex-array/src/patches.rs b/vortex-array/src/patches.rs index 0fba35ef808..007ffa43a5d 100644 --- a/vortex-array/src/patches.rs +++ b/vortex-array/src/patches.rs @@ -406,9 +406,9 @@ impl Patches { /// # Returns /// [`SearchResult::Found`] with the position if needle exists, or [`SearchResult::NotFound`] /// with the insertion point if not found. - #[expect(deprecated)] fn search_index_binary_search(indices: &ArrayRef, needle: usize) -> VortexResult { if indices.is_canonical() { + #[expect(deprecated)] let primitive = indices.to_primitive(); match_each_integer_ptype!(primitive.ptype(), |T| { let Ok(needle) = T::try_from(needle) else { @@ -1150,7 +1150,6 @@ mod test { } #[test] - #[expect(deprecated)] fn take_with_nulls() { let patches = Patches::new( 20, @@ -1169,7 +1168,9 @@ mod test { ) .unwrap() .unwrap(); + #[expect(deprecated)] let primitive_values = taken.values().to_primitive(); + #[expect(deprecated)] let primitive_indices = taken.indices().to_primitive(); assert_eq!(taken.array_len(), 2); assert_arrays_eq!( @@ -1192,7 +1193,6 @@ mod test { } #[test] - #[expect(deprecated)] fn take_search_with_nulls_chunked() { let patches = Patches::new( 20, @@ -1212,6 +1212,7 @@ mod test { .unwrap() .unwrap(); + #[expect(deprecated)] let primitive_values = taken.values().to_primitive(); assert_eq!(taken.array_len(), 2); assert_arrays_eq!( @@ -1481,7 +1482,6 @@ mod test { } #[test] - #[expect(deprecated)] fn test_mask_nullable_values() { let patches = Patches::new( 10, @@ -1505,6 +1505,7 @@ mod test { assert_arrays_eq!(masked.indices(), PrimitiveArray::from_iter([5u64, 8])); // Values should be the null and 300 + #[expect(deprecated)] let masked_values = masked.values().to_primitive(); assert_eq!(masked_values.len(), 2); assert!( @@ -1670,7 +1671,6 @@ mod test { } #[test] - #[expect(deprecated)] fn test_patch_values() { let patches = Patches::new( 10, @@ -1681,6 +1681,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let values = patches.values().to_primitive(); assert_eq!( i32::try_from( diff --git a/vortex-array/src/scalar_fn/fns/binary/compare.rs b/vortex-array/src/scalar_fn/fns/binary/compare.rs index b0127ddb65a..2b9d971006d 100644 --- a/vortex-array/src/scalar_fn/fns/binary/compare.rs +++ b/vortex-array/src/scalar_fn/fns/binary/compare.rs @@ -279,7 +279,6 @@ mod tests { use crate::validity::Validity; #[test] - #[expect(deprecated)] fn test_bool_basic_comparisons() { use vortex_buffer::BitBuffer; @@ -288,6 +287,7 @@ mod tests { Validity::from_iter([false, true, true, true, true]), ); + #[expect(deprecated)] let matches = arr .clone() .into_array() @@ -296,6 +296,7 @@ mod tests { .to_bool(); assert_eq!(to_int_indices(matches).unwrap(), [1u64, 2, 3, 4]); + #[expect(deprecated)] let matches = arr .clone() .into_array() @@ -310,6 +311,7 @@ mod tests { Validity::from_iter([false, true, true, true, true]), ); + #[expect(deprecated)] let matches = arr .clone() .into_array() @@ -318,6 +320,7 @@ mod tests { .to_bool(); assert_eq!(to_int_indices(matches).unwrap(), [2u64, 3, 4]); + #[expect(deprecated)] let matches = arr .clone() .into_array() @@ -326,6 +329,7 @@ mod tests { .to_bool(); assert_eq!(to_int_indices(matches).unwrap(), [4u64]); + #[expect(deprecated)] let matches = other .clone() .into_array() @@ -334,6 +338,7 @@ mod tests { .to_bool(); assert_eq!(to_int_indices(matches).unwrap(), [2u64, 3, 4]); + #[expect(deprecated)] let matches = other .into_array() .binary(arr.into_array(), Operator::Gt) diff --git a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs index 88a52ed7c9d..2a79a0c6af2 100644 --- a/vortex-array/src/scalar_fn/fns/list_contains/mod.rs +++ b/vortex-array/src/scalar_fn/fns/list_contains/mod.rs @@ -711,15 +711,18 @@ mod tests { // -- Tests migrated from compute/list_contains.rs -- - #[expect(deprecated)] fn nonnull_strings(values: Vec>) -> ArrayRef { - ListArray::from_iter_slow::(values, Arc::new(DType::Utf8(Nullability::NonNullable))) - .unwrap() - .to_listview() - .into_array() + #[expect(deprecated)] + let result = ListArray::from_iter_slow::( + values, + Arc::new(DType::Utf8(Nullability::NonNullable)), + ) + .unwrap() + .to_listview() + .into_array(); + result } - #[expect(deprecated)] fn null_strings(values: Vec>>) -> ArrayRef { let elements = values.iter().flatten().cloned().collect_vec(); @@ -736,11 +739,13 @@ mod tests { let elements = VarBinArray::from_iter(elements, DType::Utf8(Nullability::Nullable)).into_array(); - ListArray::try_new(elements, offsets, Validity::NonNullable) + #[expect(deprecated)] + let result = ListArray::try_new(elements, offsets, Validity::NonNullable) .unwrap() .as_array() .to_listview() - .into_array() + .into_array(); + result } fn bool_array(values: Vec, validity: Validity) -> BoolArray { diff --git a/vortex-array/src/scalar_fn/fns/merge.rs b/vortex-array/src/scalar_fn/fns/merge.rs index 5693da5485f..0c79ef86731 100644 --- a/vortex-array/src/scalar_fn/fns/merge.rs +++ b/vortex-array/src/scalar_fn/fns/merge.rs @@ -311,7 +311,6 @@ mod tests { use crate::scalar_fn::fns::merge::StructArray; use crate::scalar_fn::fns::pack::Pack; - #[expect(deprecated)] fn primitive_field(array: &ArrayRef, field_path: &[&str]) -> VortexResult { let mut field_path = field_path.iter(); @@ -319,11 +318,16 @@ mod tests { vortex_bail!("empty field path"); }; + #[expect(deprecated)] let mut array = array.to_struct().unmasked_field_by_name(field)?.clone(); for field in field_path { - array = array.to_struct().unmasked_field_by_name(field)?.clone(); + #[expect(deprecated)] + let next = array.to_struct().unmasked_field_by_name(field)?.clone(); + array = next; } - Ok(array.to_primitive()) + #[expect(deprecated)] + let result = array.to_primitive(); + Ok(result) } #[test] @@ -456,7 +460,6 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn test_nested_merge() { // Nested structs are not merged! @@ -494,13 +497,16 @@ mod tests { ]) .unwrap() .into_array(); + #[expect(deprecated)] let actual_array = test_array.apply(&expr).unwrap().to_struct(); + #[expect(deprecated)] + let inner_struct = actual_array + .unmasked_field_by_name("a") + .unwrap() + .to_struct(); assert_eq!( - actual_array - .unmasked_field_by_name("a") - .unwrap() - .to_struct() + inner_struct .names() .iter() .map(|name| name.as_ref()) @@ -510,7 +516,6 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn test_merge_order() { let expr = merge(vec![get_item("0", root()), get_item("1", root())]); @@ -536,6 +541,7 @@ mod tests { ]) .unwrap() .into_array(); + #[expect(deprecated)] let actual_array = test_array.apply(&expr).unwrap().to_struct(); assert_eq!(actual_array.names(), ["a", "c", "b", "d"]); diff --git a/vortex-array/src/scalar_fn/fns/not/mod.rs b/vortex-array/src/scalar_fn/fns/not/mod.rs index 73c5dee80ea..66953709640 100644 --- a/vortex-array/src/scalar_fn/fns/not/mod.rs +++ b/vortex-array/src/scalar_fn/fns/not/mod.rs @@ -135,19 +135,13 @@ mod tests { use crate::scalar_fn::fns::not::BoolArray; #[test] - #[expect(deprecated)] fn invert_booleans() { let not_expr = not(root()); let bools = BoolArray::from_iter([false, true, false, false, true, true]); + #[expect(deprecated)] + let result = bools.into_array().apply(¬_expr).unwrap().to_bool(); assert_eq!( - bools - .into_array() - .apply(¬_expr) - .unwrap() - .to_bool() - .to_bit_buffer() - .iter() - .collect::>(), + result.to_bit_buffer().iter().collect::>(), vec![true, false, true, true, false, false] ); } diff --git a/vortex-array/src/scalar_fn/fns/pack.rs b/vortex-array/src/scalar_fn/fns/pack.rs index c7660a8a422..0a24f721064 100644 --- a/vortex-array/src/scalar_fn/fns/pack.rs +++ b/vortex-array/src/scalar_fn/fns/pack.rs @@ -189,7 +189,6 @@ mod tests { .into_array() } - #[expect(deprecated)] fn primitive_field(array: &ArrayRef, field_path: &[&str]) -> VortexResult { let mut field_path = field_path.iter(); @@ -197,15 +196,19 @@ mod tests { vortex_bail!("empty field path"); }; + #[expect(deprecated)] let mut array = array.to_struct().unmasked_field_by_name(field)?.clone(); for field in field_path { - array = array.to_struct().unmasked_field_by_name(field)?.clone(); + #[expect(deprecated)] + let next = array.to_struct().unmasked_field_by_name(field)?.clone(); + array = next; } - Ok(array.to_primitive()) + #[expect(deprecated)] + let result = array.to_primitive(); + Ok(result) } #[test] - #[expect(deprecated)] pub fn test_empty_pack() { let expr = Pack.new_expr( PackOptions { @@ -218,11 +221,12 @@ mod tests { let test_array = test_array(); let actual_array = test_array.clone().apply(&expr).unwrap(); assert_eq!(actual_array.len(), test_array.len()); - assert_eq!(actual_array.to_struct().struct_fields().nfields(), 0); + #[expect(deprecated)] + let nfields = actual_array.to_struct().struct_fields().nfields(); + assert_eq!(nfields, 0); } #[test] - #[expect(deprecated)] pub fn test_simple_pack() { let expr = Pack.new_expr( PackOptions { @@ -232,6 +236,7 @@ mod tests { [col("a"), col("b"), col("a")], ); + #[expect(deprecated)] let actual_array = test_array().apply(&expr).unwrap().to_struct(); assert_eq!(actual_array.names(), ["one", "two", "three"]); @@ -252,7 +257,6 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn test_nested_pack() { let expr = Pack.new_expr( PackOptions { @@ -272,6 +276,7 @@ mod tests { ], ); + #[expect(deprecated)] let actual_array = test_array().apply(&expr).unwrap().to_struct(); assert_eq!(actual_array.names(), ["one", "two", "three"]); @@ -295,7 +300,6 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn test_pack_nullable() { let expr = Pack.new_expr( PackOptions { @@ -305,6 +309,7 @@ mod tests { [col("a"), col("b"), col("a")], ); + #[expect(deprecated)] let actual_array = test_array().apply(&expr).unwrap().to_struct(); assert_eq!(actual_array.names(), ["one", "two", "three"]); diff --git a/vortex-array/src/scalar_fn/fns/select.rs b/vortex-array/src/scalar_fn/fns/select.rs index 6c1be3c86ea..2ca070c2bc4 100644 --- a/vortex-array/src/scalar_fn/fns/select.rs +++ b/vortex-array/src/scalar_fn/fns/select.rs @@ -333,20 +333,20 @@ mod tests { } #[test] - #[expect(deprecated)] pub fn include_columns() { let st = test_array(); let select = select(vec![FieldName::from("a")], root()); + #[expect(deprecated)] let selected = st.into_array().apply(&select).unwrap().to_struct(); let selected_names = selected.names().clone(); assert_eq!(selected_names.as_ref(), &["a"]); } #[test] - #[expect(deprecated)] pub fn exclude_columns() { let st = test_array(); let select = select_exclude(vec![FieldName::from("a")], root()); + #[expect(deprecated)] let selected = st.into_array().apply(&select).unwrap().to_struct(); let selected_names = selected.names().clone(); assert_eq!(selected_names.as_ref(), &["b"]); diff --git a/vortex-bench/src/datasets/tpch_l_comment.rs b/vortex-bench/src/datasets/tpch_l_comment.rs index 00a141f03ba..3488ef92979 100644 --- a/vortex-bench/src/datasets/tpch_l_comment.rs +++ b/vortex-bench/src/datasets/tpch_l_comment.rs @@ -9,6 +9,7 @@ use futures::TryStreamExt; use glob::glob; use vortex::array::ArrayRef; use vortex::array::IntoArray; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::ChunkedArray; use vortex::dtype::Nullability::NonNullable; @@ -76,7 +77,11 @@ impl Dataset for TPCHLCommentChunked { let file_chunks: Vec<_> = file .scan()? .with_projection(pack(vec![("l_comment", col("l_comment"))], NonNullable)) - .map(|a| Ok(a.to_canonical()?.into_array())) + .map(|a| { + #[expect(deprecated)] + let canonical = a.to_canonical()?; + Ok(canonical.into_array()) + }) .into_array_stream()? .try_collect() .await?; @@ -100,11 +105,9 @@ impl Dataset for TPCHLCommentCanonical { } async fn to_vortex_array(&self) -> Result { - let comments_canonical = TPCHLCommentChunked - .to_vortex_array() - .await? - .to_struct() - .into_array(); + let comments_chunked = TPCHLCommentChunked.to_vortex_array().await?; + #[expect(deprecated)] + let comments_canonical = comments_chunked.to_struct().into_array(); Ok(ChunkedArray::from_iter([comments_canonical]).into_array()) } diff --git a/vortex-btrblocks/benches/compress.rs b/vortex-btrblocks/benches/compress.rs index 8b6832ea630..a82dafacf3b 100644 --- a/vortex-btrblocks/benches/compress.rs +++ b/vortex-btrblocks/benches/compress.rs @@ -13,6 +13,7 @@ mod benchmarks { use rand::prelude::StdRng; use vortex_array::ArrayRef; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_btrblocks::BtrBlocksCompressor; use vortex_buffer::buffer_mut; @@ -39,6 +40,7 @@ mod benchmarks { #[divan::bench] fn btrblocks(bencher: Bencher) { + #[expect(deprecated)] let array = make_clickbench_window_name().to_primitive(); let compressor = BtrBlocksCompressor::default(); bencher diff --git a/vortex-btrblocks/src/schemes/decimal.rs b/vortex-btrblocks/src/schemes/decimal.rs index 3b9def06633..a801b9bfd9b 100644 --- a/vortex-btrblocks/src/schemes/decimal.rs +++ b/vortex-btrblocks/src/schemes/decimal.rs @@ -6,6 +6,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::decimal::narrowed_decimal; @@ -59,6 +60,7 @@ impl Scheme for DecimalScheme { ) -> VortexResult { // TODO(joe): add support splitting i128/256 buffers into chunks of primitive values // for compression. 2 for i128 and 4 for i256. + #[expect(deprecated)] let decimal = data.array().clone().to_decimal(); let decimal = narrowed_decimal(decimal); let validity = decimal.validity()?; diff --git a/vortex-btrblocks/src/schemes/float.rs b/vortex-btrblocks/src/schemes/float.rs index f6d2389f08b..9e7e56fd7a5 100644 --- a/vortex-btrblocks/src/schemes/float.rs +++ b/vortex-btrblocks/src/schemes/float.rs @@ -14,6 +14,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::Patched; @@ -253,6 +254,7 @@ impl Scheme for NullDominatedSparseScheme { let sparse_encoded = Sparse::encode(data.array(), None)?; if let Some(sparse) = sparse_encoded.as_opt::() { + #[expect(deprecated)] let indices = sparse.patches().indices().to_primitive().narrow()?; let compressed_indices = compressor.compress_child(&indices.into_array(), &ctx, self.id(), 0)?; diff --git a/vortex-btrblocks/src/schemes/integer.rs b/vortex-btrblocks/src/schemes/integer.rs index cb765fbec5a..cde4f7c7556 100644 --- a/vortex-btrblocks/src/schemes/integer.rs +++ b/vortex-btrblocks/src/schemes/integer.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::ConstantArray; @@ -186,8 +187,10 @@ impl Scheme for FoRScheme { data: &mut ArrayAndStats, ctx: CompressorContext, ) -> VortexResult { + #[expect(deprecated)] let primitive = data.array().to_primitive(); let for_array = FoR::encode(primitive)?; + #[expect(deprecated)] let biased = for_array.encoded().to_primitive(); // Immediately bitpack. If any other scheme was preferable, it would be chosen instead @@ -290,6 +293,7 @@ impl Scheme for ZigZagScheme { ) -> VortexResult { // Zigzag encode the values, then recursively compress the inner values. let zag = zigzag_encode(data.array_as_primitive())?; + #[expect(deprecated)] let encoded = zag.encoded().to_primitive(); let compressed = compressor.compress_child(&encoded.into_array(), &ctx, self.id(), 0)?; @@ -521,13 +525,16 @@ impl Scheme for SparseScheme { )?; if let Some(sparse) = sparse_encoded.as_opt::() { + #[expect(deprecated)] + let sparse_values_primitive = sparse.patches().values().to_primitive(); let compressed_values = compressor.compress_child( - &sparse.patches().values().to_primitive().into_array(), + &sparse_values_primitive.into_array(), &ctx, self.id(), 0, )?; + #[expect(deprecated)] let indices = sparse.patches().indices().to_primitive().narrow()?; let compressed_indices = @@ -624,8 +631,10 @@ impl Scheme for RunEndScheme { // Run-end encode the ends. let (ends, values) = runend_encode(data.array_as_primitive()); + #[expect(deprecated)] + let values_primitive = values.to_primitive(); let compressed_values = - compressor.compress_child(&values.to_primitive().into_array(), &ctx, self.id(), 0)?; + compressor.compress_child(&values_primitive.into_array(), &ctx, self.id(), 0)?; let compressed_ends = compressor.compress_child(&ends.into_array(), &ctx, self.id(), 1)?; @@ -776,41 +785,36 @@ pub(crate) fn rle_compress( ) -> VortexResult { let rle_array = RLE::encode(data.array_as_primitive())?; - let compressed_values = compressor.compress_child( - &rle_array.values().to_primitive().into_array(), - &ctx, - scheme.id(), - 0, - )?; + #[expect(deprecated)] + let rle_values_primitive = rle_array.values().to_primitive(); + let compressed_values = + compressor.compress_child(&rle_values_primitive.into_array(), &ctx, scheme.id(), 0)?; // Delta is an unstable encoding, once we deem it stable we can switch over to this always. #[cfg(feature = "unstable_encodings")] - let compressed_indices = try_compress_delta( - compressor, - &rle_array.indices().to_primitive().narrow()?.into_array(), - &ctx, - scheme.id(), - 1, - )?; + let compressed_indices = { + #[expect(deprecated)] + let rle_indices_primitive = rle_array.indices().to_primitive().narrow()?; + try_compress_delta( + compressor, + &rle_indices_primitive.into_array(), + &ctx, + scheme.id(), + 1, + )? + }; #[cfg(not(feature = "unstable_encodings"))] - let compressed_indices = compressor.compress_child( - &rle_array.indices().to_primitive().narrow()?.into_array(), - &ctx, - scheme.id(), - 1, - )?; - - let compressed_offsets = compressor.compress_child( - &rle_array - .values_idx_offsets() - .to_primitive() - .narrow()? - .into_array(), - &ctx, - scheme.id(), - 2, - )?; + let compressed_indices = { + #[expect(deprecated)] + let rle_indices_primitive = rle_array.indices().to_primitive().narrow()?; + compressor.compress_child(&rle_indices_primitive.into_array(), &ctx, scheme.id(), 1)? + }; + + #[expect(deprecated)] + let rle_offsets_primitive = rle_array.values_idx_offsets().to_primitive().narrow()?; + let compressed_offsets = + compressor.compress_child(&rle_offsets_primitive.into_array(), &ctx, scheme.id(), 2)?; // SAFETY: Recursive compression doesn't affect the invariants. unsafe { @@ -833,8 +837,10 @@ fn try_compress_delta( parent_id: SchemeId, child_index: usize, ) -> VortexResult { + #[expect(deprecated)] + let child_primitive = child.to_primitive(); let (bases, deltas) = - vortex_fastlanes::delta_compress(&child.to_primitive(), &mut compressor.execution_ctx())?; + vortex_fastlanes::delta_compress(&child_primitive, &mut compressor.execution_ctx())?; let compressed_bases = compressor.compress_child(&bases.into_array(), parent_ctx, parent_id, child_index)?; diff --git a/vortex-btrblocks/src/schemes/patches.rs b/vortex-btrblocks/src/schemes/patches.rs index f094b92895e..3513ea5ad06 100644 --- a/vortex-btrblocks/src/schemes/patches.rs +++ b/vortex-btrblocks/src/schemes/patches.rs @@ -4,6 +4,7 @@ use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::ConstantArray; @@ -15,6 +16,7 @@ use vortex_error::VortexResult; /// Compresses the given patches by downscaling integers and checking for constant values. pub fn compress_patches(patches: Patches) -> VortexResult { // Downscale the patch indices. + #[expect(deprecated)] let indices = patches.indices().to_primitive().narrow()?.into_array(); // Check if the values are constant. @@ -32,7 +34,11 @@ pub fn compress_patches(patches: Patches) -> VortexResult { let chunk_offsets = patches .chunk_offsets() .as_ref() - .map(|offsets| Ok::(offsets.to_primitive().narrow()?.into_array())) + .map(|offsets| { + #[expect(deprecated)] + let offsets_primitive = offsets.to_primitive().narrow()?.into_array(); + Ok::(offsets_primitive) + }) .transpose()?; Patches::new( diff --git a/vortex-btrblocks/src/schemes/string.rs b/vortex-btrblocks/src/schemes/string.rs index 5b21d6c1d59..60bee2cf099 100644 --- a/vortex-btrblocks/src/schemes/string.rs +++ b/vortex-btrblocks/src/schemes/string.rs @@ -6,6 +6,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::VarBinArray; use vortex_array::arrays::primitive::PrimitiveArrayExt; @@ -88,23 +89,19 @@ impl Scheme for FSSTScheme { let compressor_fsst = fsst_train_compressor(&utf8); let fsst = fsst_compress(&utf8, utf8.len(), utf8.dtype(), &compressor_fsst); + #[expect(deprecated)] + let uncompressed_lengths_primitive = fsst.uncompressed_lengths().to_primitive().narrow()?; let compressed_original_lengths = compressor.compress_child( - &fsst - .uncompressed_lengths() - .to_primitive() - .narrow()? - .into_array(), + &uncompressed_lengths_primitive.into_array(), &ctx, self.id(), 0, )?; - let compressed_codes_offsets = compressor.compress_child( - &fsst.codes().offsets().to_primitive().narrow()?.into_array(), - &ctx, - self.id(), - 1, - )?; + #[expect(deprecated)] + let codes_offsets_primitive = fsst.codes().offsets().to_primitive().narrow()?; + let compressed_codes_offsets = + compressor.compress_child(&codes_offsets_primitive.into_array(), &ctx, self.id(), 1)?; let compressed_codes = VarBinArray::try_new( compressed_codes_offsets, fsst.codes().bytes().clone(), @@ -186,6 +183,7 @@ impl Scheme for NullDominatedSparseScheme { if let Some(sparse) = sparse_encoded.as_opt::() { // Compress the indices only (not the values for strings). + #[expect(deprecated)] let indices = sparse.patches().indices().to_primitive().narrow()?; let compressed_indices = compressor.compress_child(&indices.into_array(), &ctx, self.id(), 0)?; diff --git a/vortex-btrblocks/src/schemes/temporal.rs b/vortex-btrblocks/src/schemes/temporal.rs index e14de1aa9c0..c0ab1f3881c 100644 --- a/vortex-btrblocks/src/schemes/temporal.rs +++ b/vortex-btrblocks/src/schemes/temporal.rs @@ -7,6 +7,7 @@ use vortex_array::ArrayRef; use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::aggregate_fn::fns::is_constant::is_constant; @@ -75,6 +76,7 @@ impl Scheme for TemporalScheme { ctx: CompressorContext, ) -> VortexResult { let array = data.array().clone(); + #[expect(deprecated)] let ext_array = array.to_extension(); let temporal_array = TemporalArray::try_from(ext_array.clone().into_array())?; @@ -99,24 +101,17 @@ impl Scheme for TemporalScheme { subseconds, } = split_temporal(temporal_array)?; - let days = compressor.compress_child( - &days.to_primitive().narrow()?.into_array(), - &ctx, - self.id(), - 0, - )?; - let seconds = compressor.compress_child( - &seconds.to_primitive().narrow()?.into_array(), - &ctx, - self.id(), - 1, - )?; - let subseconds = compressor.compress_child( - &subseconds.to_primitive().narrow()?.into_array(), - &ctx, - self.id(), - 2, - )?; + #[expect(deprecated)] + let days_primitive = days.to_primitive().narrow()?; + let days = compressor.compress_child(&days_primitive.into_array(), &ctx, self.id(), 0)?; + #[expect(deprecated)] + let seconds_primitive = seconds.to_primitive().narrow()?; + let seconds = + compressor.compress_child(&seconds_primitive.into_array(), &ctx, self.id(), 1)?; + #[expect(deprecated)] + let subseconds_primitive = subseconds.to_primitive().narrow()?; + let subseconds = + compressor.compress_child(&subseconds_primitive.into_array(), &ctx, self.id(), 2)?; Ok(DateTimeParts::try_new(dtype, days, seconds, subseconds)?.into_array()) } diff --git a/vortex-compressor/src/builtins/dict/float.rs b/vortex-compressor/src/builtins/dict/float.rs index 18d5c216aa9..a18926961e1 100644 --- a/vortex-compressor/src/builtins/dict/float.rs +++ b/vortex-compressor/src/builtins/dict/float.rs @@ -242,6 +242,7 @@ impl_encode!(f64, u64); #[cfg(test)] mod tests { use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; use vortex_array::arrays::PrimitiveArray; @@ -276,6 +277,7 @@ mod tests { Validity::Array(BoolArray::from_iter([true, true, true, false, true]).into_array()), ) .into_array(); + #[expect(deprecated)] let undict = dict_array.as_array().to_primitive().into_array(); assert_arrays_eq!(undict, expected); } diff --git a/vortex-compressor/src/builtins/dict/integer.rs b/vortex-compressor/src/builtins/dict/integer.rs index 0693612aaee..135dfd8080c 100644 --- a/vortex-compressor/src/builtins/dict/integer.rs +++ b/vortex-compressor/src/builtins/dict/integer.rs @@ -249,6 +249,7 @@ impl_encode!(i64); #[cfg(test)] mod tests { use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; use vortex_array::arrays::PrimitiveArray; @@ -282,6 +283,7 @@ mod tests { Validity::Array(BoolArray::from_iter([true, true, true, false, true]).into_array()), ) .into_array(); + #[expect(deprecated)] let undict = dict_array.as_array().to_primitive().into_array(); assert_arrays_eq!(undict, expected); } diff --git a/vortex-compressor/src/compressor.rs b/vortex-compressor/src/compressor.rs index db0803a6ee8..e23353f43df 100644 --- a/vortex-compressor/src/compressor.rs +++ b/vortex-compressor/src/compressor.rs @@ -13,6 +13,7 @@ use vortex_array::CanonicalValidity; use vortex_array::ExecutionCtx; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::ConstantArray; @@ -476,10 +477,10 @@ impl CascadingCompressor { // Record the root scheme with the offsets child index so root exclusion rules apply. let offset_ctx = ctx.descend_with_scheme(ROOT_SCHEME_ID, root_list_children::OFFSETS); - let compressed_offsets = self.compress_canonical( - Canonical::Primitive(list_array.offsets().to_primitive().narrow()?), - offset_ctx, - )?; + #[expect(deprecated)] + let list_offsets_primitive = list_array.offsets().to_primitive().narrow()?; + let compressed_offsets = + self.compress_canonical(Canonical::Primitive(list_offsets_primitive), offset_ctx)?; Ok( ListArray::try_new(compressed_elems, compressed_offsets, list_array.validity()?)? @@ -499,16 +500,18 @@ impl CascadingCompressor { let offset_ctx = ctx .clone() .descend_with_scheme(ROOT_SCHEME_ID, root_list_children::OFFSETS); + #[expect(deprecated)] + let list_view_offsets_primitive = list_view.offsets().to_primitive().narrow()?; let compressed_offsets = self.compress_canonical( - Canonical::Primitive(list_view.offsets().to_primitive().narrow()?), + Canonical::Primitive(list_view_offsets_primitive), offset_ctx, )?; let sizes_ctx = ctx.descend_with_scheme(ROOT_SCHEME_ID, root_list_children::SIZES); - let compressed_sizes = self.compress_canonical( - Canonical::Primitive(list_view.sizes().to_primitive().narrow()?), - sizes_ctx, - )?; + #[expect(deprecated)] + let list_view_sizes_primitive = list_view.sizes().to_primitive().narrow()?; + let compressed_sizes = + self.compress_canonical(Canonical::Primitive(list_view_sizes_primitive), sizes_ctx)?; Ok(ListViewArray::try_new( compressed_elems, diff --git a/vortex-compressor/src/stats/cache.rs b/vortex-compressor/src/stats/cache.rs index 30860b93bbe..28d7d0bc390 100644 --- a/vortex-compressor/src/stats/cache.rs +++ b/vortex-compressor/src/stats/cache.rs @@ -8,6 +8,7 @@ use std::any::TypeId; use vortex_array::ArrayRef; use vortex_array::ArrayView; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::Primitive; use vortex_array::arrays::VarBinView; @@ -141,7 +142,9 @@ impl ArrayAndStats { let array = self.array.clone(); self.cache.get_or_insert_with::(|| { - BoolStats::generate(&array.to_bool()).vortex_expect("BoolStats shouldn't fail") + #[expect(deprecated)] + let bool_array = array.to_bool(); + BoolStats::generate(&bool_array).vortex_expect("BoolStats shouldn't fail") }) } @@ -153,7 +156,9 @@ impl ArrayAndStats { let opts = self.opts; self.cache.get_or_insert_with::(|| { - IntegerStats::generate_opts(&array.to_primitive(), opts) + #[expect(deprecated)] + let primitive = array.to_primitive(); + IntegerStats::generate_opts(&primitive, opts) }) } @@ -163,7 +168,9 @@ impl ArrayAndStats { let opts = self.opts; self.cache.get_or_insert_with::(|| { - FloatStats::generate_opts(&array.to_primitive(), opts) + #[expect(deprecated)] + let primitive = array.to_primitive(); + FloatStats::generate_opts(&primitive, opts) }) } @@ -173,7 +180,9 @@ impl ArrayAndStats { let opts = self.opts; self.cache.get_or_insert_with::(|| { - StringStats::generate_opts(&array.to_varbinview(), opts) + #[expect(deprecated)] + let varbinview = array.to_varbinview(); + StringStats::generate_opts(&varbinview, opts) }) } diff --git a/vortex-compressor/src/stats/float.rs b/vortex-compressor/src/stats/float.rs index 7a37c1b7c34..74b1a9828b3 100644 --- a/vortex-compressor/src/stats/float.rs +++ b/vortex-compressor/src/stats/float.rs @@ -272,6 +272,7 @@ where #[cfg(test)] mod tests { use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::validity::Validity; @@ -282,6 +283,7 @@ mod tests { #[test] fn test_float_stats() { let floats = buffer![0.0f32, 1.0f32, 2.0f32].into_array(); + #[expect(deprecated)] let floats = floats.to_primitive(); let stats = FloatStats::generate_opts( diff --git a/vortex-cuda/benches/dynamic_dispatch_cuda.rs b/vortex-cuda/benches/dynamic_dispatch_cuda.rs index 917fd1b7cd4..c814c03f3fe 100644 --- a/vortex-cuda/benches/dynamic_dispatch_cuda.rs +++ b/vortex-cuda/benches/dynamic_dispatch_cuda.rs @@ -19,6 +19,7 @@ use cudarc::driver::PushKernelArg; use cudarc::driver::sys::CUevent_flags; use vortex::array::IntoArray; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::DictArray; @@ -382,6 +383,7 @@ fn bench_alp_for_bitpacked(c: &mut Criterion) { ) .vortex_expect("alp_encode"); assert!(alp.patches().is_none()); + #[expect(deprecated)] let for_arr = FoRData::encode(alp.encoded().to_primitive()).vortex_expect("for encode"); let bp = BitPackedData::encode(for_arr.encoded(), bit_width).vortex_expect("bitpack encode"); diff --git a/vortex-cuda/gpu-scan-cli/src/main.rs b/vortex-cuda/gpu-scan-cli/src/main.rs index 4c343742000..b58b8248894 100644 --- a/vortex-cuda/gpu-scan-cli/src/main.rs +++ b/vortex-cuda/gpu-scan-cli/src/main.rs @@ -18,7 +18,8 @@ use tracing_subscriber::fmt::format::FmtSpan; use tracing_subscriber::layer::SubscriberExt; use tracing_subscriber::util::SubscriberInitExt; use vortex::VortexSessionDefault; -use vortex::array::ToCanonical; +#[expect(deprecated)] +use vortex::array::ToCanonical as _; use vortex::array::arrays::Dict; use vortex::array::arrays::struct_::StructArrayExt; use vortex::buffer::ByteBufferMut; @@ -178,6 +179,7 @@ async fn cmd_scan(path: PathBuf, gpu_file: bool, json_output: bool) -> VortexRes let mut chunk = 0; while let Some(next) = batches.next().await.transpose()? { + #[expect(deprecated)] let record = next.to_struct(); for (field, field_name) in record diff --git a/vortex-cuda/src/arrow/canonical.rs b/vortex-cuda/src/arrow/canonical.rs index 660c2872259..3baf6fce9e3 100644 --- a/vortex-cuda/src/arrow/canonical.rs +++ b/vortex-cuda/src/arrow/canonical.rs @@ -5,6 +5,7 @@ use async_trait::async_trait; use futures::future::BoxFuture; use vortex::array::ArrayRef; use vortex::array::Canonical; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::StructArray; use vortex::array::arrays::bool::BoolDataParts; @@ -116,6 +117,7 @@ fn export_canonical( vortex_bail!("only support temporal extension types currently"); } + #[expect(deprecated)] let values = extension.storage_array().to_primitive(); let len = extension.len(); diff --git a/vortex-cuda/src/dynamic_dispatch/mod.rs b/vortex-cuda/src/dynamic_dispatch/mod.rs index fd7190b034f..e30fa81ad28 100644 --- a/vortex-cuda/src/dynamic_dispatch/mod.rs +++ b/vortex-cuda/src/dynamic_dispatch/mod.rs @@ -496,6 +496,7 @@ mod tests { use cudarc::driver::PushKernelArg; use rstest::rstest; use vortex::array::IntoArray; + #[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::DictArray; use vortex::array::arrays::PrimitiveArray; @@ -882,6 +883,7 @@ mod tests { &mut LEGACY_SESSION.create_execution_ctx(), )?; assert!(alp.patches().is_none()); + #[expect(deprecated)] let for_arr = FoR::encode(alp.encoded().to_primitive())?; let bp = BitPacked::encode(for_arr.encoded(), 6)?; @@ -1930,6 +1932,7 @@ mod tests { .into_host() .await?; + #[expect(deprecated)] let prim = result.into_primitive(); assert_eq!(prim.len(), 2048); assert!(matches!(prim.validity()?, Validity::AllInvalid)); diff --git a/vortex-cuda/src/kernel/patches/mod.rs b/vortex-cuda/src/kernel/patches/mod.rs index 2b1db3dd0a1..e8fafa3087f 100644 --- a/vortex-cuda/src/kernel/patches/mod.rs +++ b/vortex-cuda/src/kernel/patches/mod.rs @@ -103,6 +103,7 @@ mod tests { use cudarc::driver::DeviceRepr; use vortex::array::IntoArray; use vortex::array::LEGACY_SESSION; + #[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::PrimitiveArray; @@ -199,10 +200,12 @@ mod tests { } fn force_cast(array: PrimitiveArray) -> PrimitiveArray { - array + #[expect(deprecated)] + let result = array .into_array() .cast(DType::Primitive(T::PTYPE, Nullability::NonNullable)) .unwrap() - .to_primitive() + .to_primitive(); + result } } diff --git a/vortex-duckdb/src/convert/vector.rs b/vortex-duckdb/src/convert/vector.rs index c63687037a4..0d73b3c6393 100644 --- a/vortex-duckdb/src/convert/vector.rs +++ b/vortex-duckdb/src/convert/vector.rs @@ -373,6 +373,7 @@ pub fn data_chunk_to_vortex( #[cfg(test)] mod tests { + #![expect(deprecated)] use std::ffi::CString; use vortex::array::LEGACY_SESSION; diff --git a/vortex-duckdb/src/exporter/dict.rs b/vortex-duckdb/src/exporter/dict.rs index d576a85c148..ff30dddc6c1 100644 --- a/vortex-duckdb/src/exporter/dict.rs +++ b/vortex-duckdb/src/exporter/dict.rs @@ -77,6 +77,7 @@ pub(crate) fn new_exporter_with_flatten( let canonical = match canonical { Some(c) => c, None => { + #[expect(deprecated)] let canonical = values.to_canonical()?; cache .canonical_cache diff --git a/vortex-ffi/src/array.rs b/vortex-ffi/src/array.rs index 1eeca276eac..d2a7923e5ad 100644 --- a/vortex-ffi/src/array.rs +++ b/vortex-ffi/src/array.rs @@ -11,6 +11,7 @@ use paste::paste; use vortex::array::ArrayRef; use vortex::array::IntoArray; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::NullArray; @@ -204,6 +205,7 @@ pub unsafe extern "C-unwind" fn vx_array_get_field( try_or_default(error_out, || { let array = vx_array::as_ref(array); + #[expect(deprecated)] let field_array = array .to_struct() .unmasked_fields() @@ -770,7 +772,9 @@ mod tests { assert!(!res.is_null()); { let res = vx_array::as_ref(res); - let buffer = res.to_bool().to_bit_buffer(); + #[expect(deprecated)] + let bool_array = res.to_bool(); + let buffer = bool_array.to_bit_buffer(); let expected = BoolArray::from_iter(vec![false, false, true, true]); assert_eq!(buffer, expected.to_bit_buffer()); } diff --git a/vortex-ffi/src/expression.rs b/vortex-ffi/src/expression.rs index 00a9df35675..1090d142551 100644 --- a/vortex-ffi/src/expression.rs +++ b/vortex-ffi/src/expression.rs @@ -286,6 +286,7 @@ pub unsafe extern "C" fn vx_expression_list_contains( #[cfg(test)] mod tests { + #![expect(deprecated)] use std::ptr; use std::sync::Arc; diff --git a/vortex-ffi/src/struct_array.rs b/vortex-ffi/src/struct_array.rs index 33409531be0..8141ce70e91 100644 --- a/vortex-ffi/src/struct_array.rs +++ b/vortex-ffi/src/struct_array.rs @@ -132,6 +132,7 @@ mod tests { use std::sync::Arc; use vortex::array::IntoArray; + #[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::PrimitiveArray; use vortex::array::arrays::StructArray; @@ -236,6 +237,7 @@ mod tests { assert!(!array.is_null()); { + #[expect(deprecated)] let array = vx_array::as_ref(array).to_struct(); assert_arrays_eq!(array, struct_array); } diff --git a/vortex-file/src/tests.rs b/vortex-file/src/tests.rs index e87fc4f731d..e42d5671a00 100644 --- a/vortex-file/src/tests.rs +++ b/vortex-file/src/tests.rs @@ -12,6 +12,7 @@ use futures::TryStreamExt; use futures::pin_mut; use vortex_array::ArrayRef; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::accessor::ArrayAccessor; @@ -307,6 +308,7 @@ async fn test_read_projection() { ) ); + #[expect(deprecated)] let actual = array.to_struct().unmasked_field(0).clone(); let expected = VarBinArray::from(strings_expected.to_vec()).into_array(); assert_arrays_eq!(actual, expected); @@ -329,6 +331,7 @@ async fn test_read_projection() { ) ); + #[expect(deprecated)] let actual = array.to_struct().unmasked_field(0).clone(); let expected = Buffer::copy_from(numbers_expected).into_array(); assert_arrays_eq!(actual, expected); @@ -373,6 +376,7 @@ async fn unequal_batches() { let array = array.unwrap(); item_count += array.len(); + #[expect(deprecated)] let numbers = array .to_struct() .unmasked_field_by_name("numbers") @@ -542,12 +546,14 @@ async fn filter_string() { .unwrap(); assert_eq!(result.len(), 1); + #[expect(deprecated)] let names_actual = result[0].to_struct().unmasked_field(0).clone(); let names_expected = VarBinArray::from_iter(vec![Some("Joseph")], DType::Utf8(Nullability::Nullable)) .into_array(); assert_arrays_eq!(names_actual, names_expected); + #[expect(deprecated)] let ages_actual = result[0].to_struct().unmasked_field(1).clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32)]).into_array(); assert_arrays_eq!(ages_actual, ages_expected); @@ -597,6 +603,7 @@ async fn filter_or() { .unwrap(); assert_eq!(result.len(), 1); + #[expect(deprecated)] let names_actual = result[0].to_struct().unmasked_field(0).clone(); let names_expected = VarBinArray::from_iter( vec![Some("Joseph"), Some("Angela")], @@ -605,6 +612,7 @@ async fn filter_or() { .into_array(); assert_arrays_eq!(names_actual, names_expected); + #[expect(deprecated)] let ages_actual = result[0].to_struct().unmasked_field(1).clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32), None]).into_array(); assert_arrays_eq!(ages_actual, ages_expected); @@ -651,6 +659,7 @@ async fn filter_and() { .unwrap(); assert_eq!(result.len(), 1); + #[expect(deprecated)] let names_actual = result[0].to_struct().unmasked_field(0).clone(); let names_expected = VarBinArray::from_iter( vec![Some("Joseph"), None], @@ -659,6 +668,7 @@ async fn filter_and() { .into_array(); assert_arrays_eq!(names_actual, names_expected); + #[expect(deprecated)] let ages_actual = result[0].to_struct().unmasked_field(1).clone(); let ages_expected = PrimitiveArray::from_option_iter([Some(25i32), Some(31i32)]).into_array(); assert_arrays_eq!(ages_actual, ages_expected); @@ -691,6 +701,7 @@ async fn test_with_indices_simple() { let file = SESSION.open_options().open_buffer(buf).unwrap(); // test no indices + #[expect(deprecated)] let actual_kept_array = file .scan() .unwrap() @@ -707,6 +718,7 @@ async fn test_with_indices_simple() { // test a few indices let kept_indices = [0_u64, 3, 99, 100, 101, 399, 400, 401, 499]; + #[expect(deprecated)] let actual_kept_array = file .scan() .unwrap() @@ -717,6 +729,7 @@ async fn test_with_indices_simple() { .await .unwrap() .to_struct(); + #[expect(deprecated)] let actual_kept_numbers_array = actual_kept_array.unmasked_field(0).to_primitive(); let expected_kept_numbers: Vec = kept_indices @@ -727,6 +740,7 @@ async fn test_with_indices_simple() { assert_arrays_eq!(actual_kept_numbers_array, expected_array); // test all indices + #[expect(deprecated)] let actual_array = file .scan() .unwrap() @@ -770,6 +784,7 @@ async fn test_with_indices_on_two_columns() { let file = SESSION.open_options().open_buffer(buf).unwrap(); let kept_indices = [0_u64, 3, 7]; + #[expect(deprecated)] let array = file .scan() .unwrap() @@ -824,6 +839,7 @@ async fn test_with_indices_and_with_row_filter_simple() { let file = SESSION.open_options().open_buffer(buf).unwrap(); + #[expect(deprecated)] let actual_kept_array = file .scan() .unwrap() @@ -841,6 +857,7 @@ async fn test_with_indices_and_with_row_filter_simple() { // test a few indices let kept_indices = [0u64, 3, 99, 100, 101, 399, 400, 401, 499]; + #[expect(deprecated)] let actual_kept_array = file .scan() .unwrap() @@ -853,6 +870,7 @@ async fn test_with_indices_and_with_row_filter_simple() { .unwrap() .to_struct(); + #[expect(deprecated)] let actual_kept_numbers_array = actual_kept_array.unmasked_field(0).to_primitive(); let expected_kept_numbers: Buffer = kept_indices @@ -864,6 +882,7 @@ async fn test_with_indices_and_with_row_filter_simple() { assert_arrays_eq!(actual_kept_numbers_array, expected_array); // test all indices + #[expect(deprecated)] let actual_array = file .scan() .unwrap() @@ -924,6 +943,7 @@ async fn filter_string_chunked() { let file = SESSION.open_options().open_buffer(buf).unwrap(); + #[expect(deprecated)] let actual_array = file .scan() .unwrap() @@ -1012,6 +1032,7 @@ async fn test_pruning_with_or() { let file = SESSION.open_options().open_buffer(buf).unwrap(); + #[expect(deprecated)] let actual_array = file .scan() .unwrap() @@ -1085,6 +1106,7 @@ async fn test_repeated_projection() { let file = SESSION.open_options().open_buffer(buf).unwrap(); + #[expect(deprecated)] let actual = file .scan() .unwrap() @@ -1241,6 +1263,7 @@ async fn write_nullable_nested_struct() -> VortexResult<()> { )? .into_array(); + #[expect(deprecated)] let result = round_trip(&array, Ok).await?.to_struct(); assert_eq!(result.len(), 3); @@ -1248,6 +1271,7 @@ async fn write_nullable_nested_struct() -> VortexResult<()> { let mut ctx = SESSION.create_execution_ctx(); assert!(result.all_valid(&mut ctx)?); + #[expect(deprecated)] let nested_struct = result.unmasked_field_by_name("struct")?.to_struct(); assert_eq!(nested_struct.dtype(), &nested_dtype); assert_eq!(nested_struct.len(), 3); @@ -1381,6 +1405,7 @@ async fn test_writer_multiple_pushes() -> VortexResult<()> { let result = file.scan()?.into_array_stream()?.read_all().await?; assert_eq!(result.len(), 9); + #[expect(deprecated)] let numbers = result .to_struct() .unmasked_field_by_name("numbers")? @@ -1415,6 +1440,7 @@ async fn test_writer_push_stream() -> VortexResult<()> { let result = file.scan()?.into_array_stream()?.read_all().await?; assert_eq!(result.len(), 6); + #[expect(deprecated)] let numbers = result .to_struct() .unmasked_field_by_name("numbers")? @@ -1479,6 +1505,7 @@ async fn test_writer_empty_chunks() -> VortexResult<()> { let result = file.scan()?.into_array_stream()?.read_all().await?; assert_eq!(result.len(), 2); + #[expect(deprecated)] let numbers = result .to_struct() .unmasked_field_by_name("numbers")? @@ -1517,6 +1544,7 @@ async fn test_writer_mixed_push_and_stream() -> VortexResult<()> { let result = file.scan()?.into_array_stream()?.read_all().await?; assert_eq!(result.len(), 6); + #[expect(deprecated)] let numbers = result .to_struct() .unmasked_field_by_name("numbers")? @@ -1559,10 +1587,12 @@ async fn test_writer_with_complex_types() -> VortexResult<()> { assert_eq!(result.len(), 3); assert_eq!(result.dtype(), &dtype); + #[expect(deprecated)] let strings_field = result .to_struct() .unmasked_field_by_name("strings") .cloned()?; + #[expect(deprecated)] let strings = strings_field.to_varbinview().with_iterator(|iter| { iter.map(|s| s.map(|st| unsafe { String::from_utf8_unchecked(st.to_vec()) })) .collect::>() diff --git a/vortex-file/tests/test_write_table.rs b/vortex-file/tests/test_write_table.rs index aa924ae44b9..06f491e9491 100644 --- a/vortex-file/tests/test_write_table.rs +++ b/vortex-file/tests/test_write_table.rs @@ -9,6 +9,7 @@ use std::sync::LazyLock; use futures::StreamExt; use futures::pin_mut; use vortex_array::IntoArray; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; use vortex_array::arrays::DictArray; @@ -102,7 +103,9 @@ async fn test_file_roundtrip() { while let Some(next) = stream.next().await { let next = next.expect("next"); + #[expect(deprecated)] let next = next.to_struct(); + #[expect(deprecated)] let a = next.unmasked_field_by_name("a").unwrap().to_struct(); let b = next.unmasked_field_by_name("b").unwrap(); diff --git a/vortex-jni/src/array.rs b/vortex-jni/src/array.rs index fe5496521b6..0ad60ae80ac 100644 --- a/vortex-jni/src/array.rs +++ b/vortex-jni/src/array.rs @@ -29,6 +29,7 @@ use jni::sys::jstring; use vortex::array::ArrayRef; use vortex::array::ArrayView; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::VarBin; @@ -234,6 +235,7 @@ pub extern "system" fn Java_dev_vortex_jni_NativeArrayMethods_getField( let array_ref = unsafe { NativeArray::from_ptr(array_ptr) }; try_or_throw(&mut env, |_| { + #[expect(deprecated)] let struct_array = array_ref.inner.to_struct(); let idx = index as usize; if idx >= struct_array.struct_fields().nfields() { @@ -303,14 +305,12 @@ macro_rules! get_primitive { let array_ref = unsafe { NativeArray::from_ptr(array_ptr) }; try_or_throw(&mut env, |_| { let scalar_value = if array_ref.is_extension { - array_ref - .inner - .to_extension() - .storage_array() - .execute_scalar( - index as usize, - &mut LEGACY_SESSION.create_execution_ctx(), - )? + #[expect(deprecated)] + let ext = array_ref.inner.to_extension(); + ext.storage_array().execute_scalar( + index as usize, + &mut LEGACY_SESSION.create_execution_ctx(), + )? } else { array_ref.inner.execute_scalar( index as usize, @@ -348,10 +348,9 @@ pub extern "system" fn Java_dev_vortex_jni_NativeArrayMethods_getBigDecimal( let array_ref = unsafe { NativeArray::from_ptr(array_ptr) }; try_or_throw(&mut env, |env| { let scalar_value = if array_ref.is_extension { - array_ref - .inner - .to_extension() - .storage_array() + #[expect(deprecated)] + let ext = array_ref.inner.to_extension(); + ext.storage_array() .execute_scalar(index as usize, &mut LEGACY_SESSION.create_execution_ctx())? } else { array_ref diff --git a/vortex-layout/src/layouts/dict/reader.rs b/vortex-layout/src/layouts/dict/reader.rs index c301a696784..9807f97b5ad 100644 --- a/vortex-layout/src/layouts/dict/reader.rs +++ b/vortex-layout/src/layouts/dict/reader.rs @@ -524,13 +524,12 @@ mod tests { .to_mask(array.len(), &mut LEGACY_SESSION.create_execution_ctx()) .unwrap() .into_array(); - assert_arrays_eq!( - actual - .to_canonical() - .vortex_expect("to_canonical failed") - .into_array(), - expected - ); + #[expect(deprecated)] + let actual_canonical = actual + .to_canonical() + .vortex_expect("to_canonical failed") + .into_array(); + assert_arrays_eq!(actual_canonical, expected); }) } } diff --git a/vortex-layout/src/layouts/file_stats.rs b/vortex-layout/src/layouts/file_stats.rs index f6b779b431d..d08c5933fb5 100644 --- a/vortex-layout/src/layouts/file_stats.rs +++ b/vortex-layout/src/layouts/file_stats.rs @@ -9,6 +9,7 @@ use itertools::Itertools; use parking_lot::Mutex; use vortex_array::ArrayRef; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical as _; use vortex_array::VortexSessionExecute; use vortex_array::arrays::struct_::StructArrayExt; @@ -95,6 +96,7 @@ impl FileStatsAccumulator { ) -> VortexResult<(SequenceId, ArrayRef)> { let (sequence_id, chunk) = chunk?; if chunk.dtype().is_struct() { + #[expect(deprecated)] let chunk = chunk.to_struct(); for (acc, field) in self .accumulators diff --git a/vortex-layout/src/layouts/flat/writer.rs b/vortex-layout/src/layouts/flat/writer.rs index bf6993d72b7..46cde10789f 100644 --- a/vortex-layout/src/layouts/flat/writer.rs +++ b/vortex-layout/src/layouts/flat/writer.rs @@ -201,6 +201,7 @@ mod tests { use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::MaskFuture; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -404,24 +405,22 @@ mod tests { .bit_buffer(), AllOr::Some(&validity_boolean_buffer) ); - assert_eq!( - result - .to_struct() - .unmasked_field_by_name("a") - .unwrap() - .to_primitive() - .as_slice::(), - &[1, 2] - ); - assert_eq!( - result - .to_struct() - .unmasked_field_by_name("b") - .unwrap() - .to_primitive() - .as_slice::(), - &[3, 4] - ); + #[expect(deprecated)] + let result_struct = result.to_struct(); + #[expect(deprecated)] + let field_a = result_struct + .unmasked_field_by_name("a") + .unwrap() + .to_primitive(); + assert_eq!(field_a.as_slice::(), &[1, 2]); + #[expect(deprecated)] + let result_struct_b = result.to_struct(); + #[expect(deprecated)] + let field_b = result_struct_b + .unmasked_field_by_name("b") + .unwrap() + .to_primitive(); + assert_eq!(field_b.as_slice::(), &[3, 4]); }) } diff --git a/vortex-layout/src/layouts/repartition.rs b/vortex-layout/src/layouts/repartition.rs index 03c7e15d722..f9bd3de86ac 100644 --- a/vortex-layout/src/layouts/repartition.rs +++ b/vortex-layout/src/layouts/repartition.rs @@ -107,7 +107,9 @@ impl LayoutStrategy for RepartitionStrategy { dtype.clone(), stream.map(|chunk| { let (sequence_id, chunk) = chunk?; - VortexResult::Ok((sequence_id, chunk.to_canonical()?.into_array())) + #[expect(deprecated)] + let canonical = chunk.to_canonical()?.into_array(); + VortexResult::Ok((sequence_id, canonical)) }), ) .sendable() @@ -145,9 +147,11 @@ impl LayoutStrategy for RepartitionStrategy { let chunked = ChunkedArray::try_new(output_chunks, dtype_clone.clone())?; if !chunked.is_empty() { + #[expect(deprecated)] + let canonical = chunked.into_array().to_canonical()?.into_array(); yield ( sequence_pointer.advance(), - chunked.into_array().to_canonical()?.into_array(), + canonical, ) } } @@ -158,9 +162,11 @@ impl LayoutStrategy for RepartitionStrategy { dtype_clone.clone(), )?; if !to_flush.is_empty() { + #[expect(deprecated)] + let canonical = to_flush.into_array().to_canonical()?.into_array(); yield ( sequence_pointer.advance(), - to_flush.into_array().to_canonical()?.into_array(), + canonical, ) } } @@ -498,7 +504,8 @@ mod tests { // Transition SharedState from Source to Cached for ALL slices sharing this Arc. use vortex_array::arrays::shared::SharedArrayExt; - shared_handle.get_or_compute(|source| source.to_canonical())?; + #[expect(deprecated)] + let _canonical = shared_handle.get_or_compute(|source| source.to_canonical())?; // Before the fix this panicked with "attempt to subtract with overflow". let _s2 = buf.pop_front().unwrap(); diff --git a/vortex-layout/src/layouts/row_idx/mod.rs b/vortex-layout/src/layouts/row_idx/mod.rs index a4cabee8e45..f435d6bd992 100644 --- a/vortex-layout/src/layouts/row_idx/mod.rs +++ b/vortex-layout/src/layouts/row_idx/mod.rs @@ -293,7 +293,9 @@ fn row_idx_array_future( let expr = expr.clone(); async move { let array = idx_array(row_offset, &row_range).into_array(); - let array = array.filter(mask.await?)?.to_canonical()?.into_array(); + let filtered = array.filter(mask.await?)?; + #[expect(deprecated)] + let array = filtered.to_canonical()?.into_array(); array.apply(&expr) } .boxed() diff --git a/vortex-layout/src/layouts/struct_/reader.rs b/vortex-layout/src/layouts/struct_/reader.rs index a9ea39a6fe0..ea6cfe1634b 100644 --- a/vortex-layout/src/layouts/struct_/reader.rs +++ b/vortex-layout/src/layouts/struct_/reader.rs @@ -11,6 +11,7 @@ use itertools::Itertools; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::MaskFuture; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::StructArray; use vortex_array::arrays::struct_::StructArrayExt; @@ -359,6 +360,7 @@ impl LayoutReader for StructReader { // If root expression was a pack, then we apply the validity to each child field if is_pack_merge { + #[expect(deprecated)] let struct_array = array.to_struct(); let masked_fields: Vec = struct_array .iter_unmasked_fields() @@ -386,6 +388,8 @@ impl LayoutReader for StructReader { #[cfg(test)] mod tests { + #![expect(deprecated)] + use std::sync::Arc; use rstest::fixture; diff --git a/vortex-layout/src/layouts/table.rs b/vortex-layout/src/layouts/table.rs index 0c602cd78fa..ca7a9bb4c27 100644 --- a/vortex-layout/src/layouts/table.rs +++ b/vortex-layout/src/layouts/table.rs @@ -17,6 +17,7 @@ use vortex_array::ArrayContext; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::struct_::StructArrayExt; @@ -236,6 +237,7 @@ impl LayoutStrategy for TableStrategy { let columns_vec_stream = stream.map(move |chunk| { let (sequence_id, chunk) = chunk?; let mut sequence_pointer = sequence_id.descend(); + #[expect(deprecated)] let struct_chunk = chunk.to_struct(); let mut columns: Vec<(SequenceId, ArrayRef)> = Vec::new(); if is_nullable { diff --git a/vortex-layout/src/layouts/zoned/reader.rs b/vortex-layout/src/layouts/zoned/reader.rs index 23118e8ce5c..1fd1ab6b0cc 100644 --- a/vortex-layout/src/layouts/zoned/reader.rs +++ b/vortex-layout/src/layouts/zoned/reader.rs @@ -16,6 +16,7 @@ use itertools::Itertools; use parking_lot::RwLock; use vortex_array::ArrayRef; use vortex_array::MaskFuture; +#[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::dtype::DType; use vortex_array::dtype::FieldMask; @@ -136,6 +137,7 @@ impl ZonedReader { .vortex_expect("Failed construct zone map evaluation"); async move { + #[expect(deprecated)] let zones_array = zones_eval.await?.to_struct(); // SAFETY: This is only fine to call because we perform validation above Ok(unsafe { ZoneMap::new_unchecked(zones_array, present_stats) }) diff --git a/vortex-layout/src/layouts/zoned/zone_map.rs b/vortex-layout/src/layouts/zoned/zone_map.rs index cb49377007e..c55554a7914 100644 --- a/vortex-layout/src/layouts/zoned/zone_map.rs +++ b/vortex-layout/src/layouts/zoned/zone_map.rs @@ -275,6 +275,8 @@ impl StatsAccumulator { #[cfg(test)] mod tests { + #![expect(deprecated)] + use std::sync::Arc; use rstest::rstest; diff --git a/vortex-layout/src/scan/scan_builder.rs b/vortex-layout/src/scan/scan_builder.rs index d53a38163fa..e1b652631ec 100644 --- a/vortex-layout/src/scan/scan_builder.rs +++ b/vortex-layout/src/scan/scan_builder.rs @@ -466,6 +466,7 @@ mod test { use parking_lot::Mutex; use vortex_array::IntoArray; use vortex_array::MaskFuture; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::dtype::DType; @@ -664,7 +665,9 @@ mod test { let mut values = Vec::new(); for chunk in &mut iter { - values.push(chunk?.to_primitive().into_buffer::()[0]); + #[expect(deprecated)] + let prim = chunk?.to_primitive(); + values.push(prim.into_buffer::()[0]); } assert_eq!(calls.load(Ordering::Relaxed), 1); diff --git a/vortex-python/src/arrays/compressed.rs b/vortex-python/src/arrays/compressed.rs index fd21c54fe69..ca14c9a52b5 100644 --- a/vortex-python/src/arrays/compressed.rs +++ b/vortex-python/src/arrays/compressed.rs @@ -3,6 +3,7 @@ use pyo3::prelude::*; use vortex::array::IntoArray; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::Dict; use vortex::encodings::alp::ALP; @@ -89,9 +90,9 @@ impl EncodingSubclass for PyZigZagArray { impl PyZigZagArray { #[staticmethod] pub fn encode(array: PyArrayRef) -> PyVortexResult { - Ok(PyVortex( - zigzag_encode(array.inner().clone().to_primitive().as_view())?.into_array(), - )) + #[expect(deprecated)] + let primitive = array.inner().clone().to_primitive(); + Ok(PyVortex(zigzag_encode(primitive.as_view())?.into_array())) } } diff --git a/vortex-python/src/arrays/mod.rs b/vortex-python/src/arrays/mod.rs index bdcc95d7726..af5f6afee6f 100644 --- a/vortex-python/src/arrays/mod.rs +++ b/vortex-python/src/arrays/mod.rs @@ -25,6 +25,7 @@ use pyo3_bytes::PyBytes; use vortex::array::ArrayRef; use vortex::array::IntoArray; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::Chunked; @@ -527,10 +528,12 @@ impl PyArray { /// ``` fn filter(slf: Bound, mask: PyArrayRef) -> PyVortexResult { let slf = PyArrayRef::extract(slf.as_any().as_borrowed())?.into_inner(); - let mask = (&*mask as &ArrayRef) - .to_bool() - .to_mask_fill_null_false(&mut LEGACY_SESSION.create_execution_ctx()); - let inner = slf.filter(mask)?.to_canonical()?.into_array(); + #[expect(deprecated)] + let mask_bool = (&*mask as &ArrayRef).to_bool(); + let mask = mask_bool.to_mask_fill_null_false(&mut LEGACY_SESSION.create_execution_ctx()); + #[expect(deprecated)] + let canonical = slf.filter(mask)?.to_canonical()?; + let inner = canonical.into_array(); Ok(PyArrayRef::from(inner)) } diff --git a/vortex-python/src/dataset.rs b/vortex-python/src/dataset.rs index dccb103037d..c9579043da6 100644 --- a/vortex-python/src/dataset.rs +++ b/vortex-python/src/dataset.rs @@ -11,6 +11,7 @@ use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use pyo3::types::PyString; use vortex::array::ArrayRef; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::iter::ArrayIteratorExt; use vortex::dtype::FieldName; @@ -61,7 +62,9 @@ pub fn read_array_from_reader( } if let Some(indices) = indices { - let indices = indices.to_primitive().into_buffer(); + #[expect(deprecated)] + let primitive = indices.to_primitive(); + let indices = primitive.into_buffer(); scan = scan.with_row_indices(indices); } diff --git a/vortex-python/src/file.rs b/vortex-python/src/file.rs index 06cee7590c1..458736db0e5 100644 --- a/vortex-python/src/file.rs +++ b/vortex-python/src/file.rs @@ -9,6 +9,7 @@ use pyo3::prelude::*; use pyo3::types::PyList; use pyo3_object_store::PyObjectStore; use vortex::array::ArrayRef; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::builtins::ArrayBuiltins; use vortex::dtype::DType; @@ -213,10 +214,9 @@ impl PyVortexFile { } if let Some(indices) = indices { - let indices = indices - .cast(DType::Primitive(PType::U64, NonNullable))? - .to_primitive() - .into_buffer::(); + let casted = indices.cast(DType::Primitive(PType::U64, NonNullable))?; + #[expect(deprecated)] + let indices = casted.to_primitive().into_buffer::(); builder = builder.with_row_indices(indices); } diff --git a/vortex-tui/src/browse/ui/layouts.rs b/vortex-tui/src/browse/ui/layouts.rs index d90720c5223..845a5988c78 100644 --- a/vortex-tui/src/browse/ui/layouts.rs +++ b/vortex-tui/src/browse/ui/layouts.rs @@ -28,6 +28,7 @@ use ratatui::widgets::Widget; use ratatui::widgets::Wrap; use vortex::array::ArrayRef; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::struct_::StructArrayExt; @@ -142,6 +143,7 @@ fn render_array(app: &AppState, area: Rect, buf: &mut Buffer, is_stats_table: bo if is_stats_table { // Render the stats table horizontally + #[expect(deprecated)] let struct_array = array.to_struct(); // add 1 for the chunk column let field_count = struct_array.struct_fields().nfields() + 1; diff --git a/vortex/benches/common_encoding_tree_throughput.rs b/vortex/benches/common_encoding_tree_throughput.rs index 7fbbd80620d..9a96c478e5c 100644 --- a/vortex/benches/common_encoding_tree_throughput.rs +++ b/vortex/benches/common_encoding_tree_throughput.rs @@ -16,6 +16,7 @@ use vortex::array::ArrayRef; use vortex::array::Canonical; use vortex::array::IntoArray; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::DictArray; @@ -76,12 +77,14 @@ mod setup { let mut rng = StdRng::seed_from_u64(0); let uint_array = PrimitiveArray::from_iter((0..NUM_VALUES).map(|_| rng.random_range(42u32..256))); + #[expect(deprecated)] let int_array = uint_array .clone() .into_array() .cast(PType::I32.into()) .unwrap() .to_primitive(); + #[expect(deprecated)] let float_array = uint_array .clone() .into_array() @@ -113,7 +116,9 @@ mod setup { .unwrap(); // Manually construct ALP <- FoR <- BitPacked tree - let for_array = FoR::encode(alp_compressed.encoded().to_primitive()).unwrap(); + #[expect(deprecated)] + let alp_encoded_prim = alp_compressed.encoded().to_primitive(); + let for_array = FoR::encode(alp_encoded_prim).unwrap(); let inner = for_array.encoded(); let bp = BitPacked::encode(inner, 8).unwrap(); let for_with_bp = @@ -184,6 +189,7 @@ mod setup { let runend = RunEnd::encode(prim_array.into_array()).unwrap(); // Compress the ends with FoR <- BitPacked + #[expect(deprecated)] let ends_prim = runend.ends().to_primitive(); let ends_for = FoR::encode(ends_prim).unwrap(); let ends_inner = ends_for.encoded(); @@ -194,6 +200,7 @@ mod setup { .into_array(); // Compress the values with BitPacked + #[expect(deprecated)] let values_prim = runend.values().to_primitive(); let compressed_values = BitPacked::encode(&values_prim.into_array(), 8) .unwrap() @@ -268,6 +275,7 @@ mod setup { // Compress the VarBin offsets with BitPacked let codes = fsst.codes(); + #[expect(deprecated)] let offsets_prim = codes.offsets().to_primitive(); let offsets_bp = BitPacked::encode(&offsets_prim.into_array(), 20).unwrap(); @@ -321,6 +329,7 @@ mod setup { let parts = split_temporal(temporal_array.clone()).unwrap(); // Compress days with FoR <- BitPacked + #[expect(deprecated)] let days_prim = parts.days.to_primitive(); let days_for = FoR::encode(days_prim).unwrap(); let days_inner = days_for.encoded(); @@ -331,6 +340,7 @@ mod setup { .into_array(); // Compress seconds with FoR <- BitPacked + #[expect(deprecated)] let seconds_prim = parts.seconds.to_primitive(); let seconds_for = FoR::encode(seconds_prim).unwrap(); let seconds_inner = seconds_for.encoded(); @@ -343,6 +353,7 @@ mod setup { .into_array(); // Compress subseconds with FoR <- BitPacked + #[expect(deprecated)] let subseconds_prim = parts.subseconds.to_primitive(); let subseconds_for = FoR::encode(subseconds_prim).unwrap(); let subseconds_inner = subseconds_for.encoded(); diff --git a/vortex/benches/single_encoding_throughput.rs b/vortex/benches/single_encoding_throughput.rs index 4ff5a8de9ef..4e2ef9b1beb 100644 --- a/vortex/benches/single_encoding_throughput.rs +++ b/vortex/benches/single_encoding_throughput.rs @@ -18,6 +18,7 @@ use vortex::array::Canonical; use vortex::array::ExecutionCtx; use vortex::array::IntoArray; use vortex::array::LEGACY_SESSION; +#[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::PrimitiveArray; use vortex::array::arrays::VarBinViewArray; @@ -77,12 +78,14 @@ fn setup_primitive_arrays() -> (PrimitiveArray, PrimitiveArray, PrimitiveArray) let mut rng = StdRng::seed_from_u64(0); let uint_array = PrimitiveArray::from_iter((0..NUM_VALUES).map(|_| rng.random_range(42u32..256))); + #[expect(deprecated)] let int_array = uint_array .clone() .into_array() .cast(PType::I32.into()) .unwrap() .to_primitive(); + #[expect(deprecated)] let float_array = uint_array .clone() .into_array() From f580386f584ce638434474c9d5ec8048689e2577 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 13:49:02 -0400 Subject: [PATCH 4/8] fix Signed-off-by: Joe Isaacs --- vortex-array/src/display/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vortex-array/src/display/mod.rs b/vortex-array/src/display/mod.rs index 04175c995c5..8907667bd6e 100644 --- a/vortex-array/src/display/mod.rs +++ b/vortex-array/src/display/mod.rs @@ -21,8 +21,6 @@ pub use tree_display::TreeDisplay; use crate::ArrayRef; use crate::LEGACY_SESSION; use crate::VortexSessionExecute; -#[expect(deprecated)] -use crate::canonical::ToCanonical as _; /// Describe how to convert an array to a string. /// @@ -581,6 +579,8 @@ impl ArrayRef { } #[cfg(feature = "table-display")] DisplayOptions::TableDisplay => { + #[expect(deprecated)] + use crate::canonical::ToCanonical as _; use crate::dtype::DType; let mut builder = tabled::builder::Builder::default(); From 249d09efbbd2a08077b32af5449d67d5b9f69348 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 13:51:34 -0400 Subject: [PATCH 5/8] fix Signed-off-by: Joe Isaacs --- vortex-cuda/src/dynamic_dispatch/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/vortex-cuda/src/dynamic_dispatch/mod.rs b/vortex-cuda/src/dynamic_dispatch/mod.rs index e30fa81ad28..9eeb99b5505 100644 --- a/vortex-cuda/src/dynamic_dispatch/mod.rs +++ b/vortex-cuda/src/dynamic_dispatch/mod.rs @@ -1932,7 +1932,6 @@ mod tests { .into_host() .await?; - #[expect(deprecated)] let prim = result.into_primitive(); assert_eq!(prim.len(), 2048); assert!(matches!(prim.validity()?, Validity::AllInvalid)); From 98fbf022be7b189e77bf65189a6a232d1c691a7f Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 14:12:23 -0400 Subject: [PATCH 6/8] fix Signed-off-by: Joe Isaacs --- encodings/alp/src/alp/array.rs | 4 +- encodings/alp/src/alp/compress.rs | 18 +++++++- encodings/alp/src/alp/compute/cast.rs | 25 +++++++---- encodings/alp/src/alp/compute/compare.rs | 31 ++++++-------- encodings/alp/src/alp/compute/filter.rs | 7 ++-- encodings/alp/src/alp/compute/mask.rs | 7 ++-- encodings/alp/src/alp/compute/take.rs | 7 ++-- encodings/alp/src/alp_rd/array.rs | 4 +- encodings/alp/src/alp_rd/compute/cast.rs | 4 +- encodings/alp/src/alp_rd/compute/take.rs | 5 ++- encodings/datetime-parts/src/compress.rs | 16 +++++--- encodings/datetime-parts/src/compute/cast.rs | 5 ++- .../src/decimal_byte_parts/compute/cast.rs | 5 ++- .../src/delta/array/delta_compress.rs | 6 ++- .../fastlanes/src/rle/array/rle_compress.rs | 12 +++++- encodings/fastlanes/src/rle/compute/cast.rs | 10 +++-- encodings/runend/src/compute/cast.rs | 3 +- encodings/sequence/src/compute/cast.rs | 5 ++- encodings/sparse/src/canonical.rs | 28 +++++++++++-- encodings/sparse/src/compute/cast.rs | 11 +++-- encodings/sparse/src/ops.rs | 4 +- encodings/zigzag/src/compute/mod.rs | 7 ++-- encodings/zstd/src/compute/cast.rs | 6 ++- .../src/arrays/bool/compute/fill_null.rs | 4 +- vortex-array/src/arrays/datetime/test.rs | 9 ++-- .../src/arrays/listview/tests/operations.rs | 10 ++++- .../src/arrays/varbin/vtable/canonical.rs | 6 ++- vortex-array/src/scalar_fn/fns/between/mod.rs | 7 +++- .../src/scalar_fn/fns/binary/boolean.rs | 5 ++- vortex-duckdb/src/convert/vector.rs | 19 ++++++++- vortex-ffi/src/expression.rs | 9 +++- vortex-layout/src/layouts/struct_/reader.rs | 11 +++-- vortex-layout/src/layouts/zoned/zone_map.rs | 41 ++++++------------- 33 files changed, 226 insertions(+), 125 deletions(-) diff --git a/encodings/alp/src/alp/array.rs b/encodings/alp/src/alp/array.rs index dab2e00fa40..887111299ab 100644 --- a/encodings/alp/src/alp/array.rs +++ b/encodings/alp/src/alp/array.rs @@ -519,8 +519,6 @@ impl ValidityChild for ALP { #[cfg(test)] mod tests { - #![expect(deprecated)] - use std::f64::consts::PI; use std::sync::LazyLock; @@ -528,6 +526,7 @@ mod tests { use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -810,6 +809,7 @@ mod tests { let slice_len = slice_end - slice_start; let sliced_encoded = encoded.slice(slice_start..slice_end).unwrap(); + #[expect(deprecated)] let result_primitive = sliced_encoded.to_primitive(); for idx in 0..slice_len { diff --git a/encodings/alp/src/alp/compress.rs b/encodings/alp/src/alp/compress.rs index d1b111e84a0..7be9c0b6537 100644 --- a/encodings/alp/src/alp/compress.rs +++ b/encodings/alp/src/alp/compress.rs @@ -131,13 +131,12 @@ where #[cfg(test)] mod tests { - #![expect(deprecated)] - use core::f64; use f64::consts::E; use f64::consts::PI; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::assert_arrays_eq; @@ -282,6 +281,7 @@ mod tests { &mut LEGACY_SESSION.create_execution_ctx(), ) .unwrap(); + #[expect(deprecated)] let decompressed = alp_arr.into_array().to_primitive(); assert_eq!( @@ -305,6 +305,7 @@ mod tests { &mut LEGACY_SESSION.create_execution_ctx(), ) .unwrap(); + #[expect(deprecated)] let decoded = encoded.as_array().to_primitive(); for idx in 0..original.len() { let decoded_val = decoded.as_slice::()[idx]; @@ -333,14 +334,17 @@ mod tests { .unwrap(); let patches = encoded.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().clone().unwrap().to_primitive(); let expected_offsets = PrimitiveArray::from_iter(vec![0u64, 1, 3]); assert_arrays_eq!(chunk_offsets, expected_offsets); + #[expect(deprecated)] let patch_indices = patches.indices().to_primitive(); let expected_indices = PrimitiveArray::from_iter(vec![1023u64, 1024, 1025]); assert_arrays_eq!(patch_indices, expected_indices); + #[expect(deprecated)] let patch_values = patches.values().to_primitive(); let expected_values = PrimitiveArray::from_iter(vec![PI, E, PI]); assert_arrays_eq!(patch_values, expected_values); @@ -361,14 +365,17 @@ mod tests { .unwrap(); let patches = encoded.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().clone().unwrap().to_primitive(); let expected_offsets = PrimitiveArray::from_iter(vec![0u64, 1, 1]); assert_arrays_eq!(chunk_offsets, expected_offsets); + #[expect(deprecated)] let patch_indices = patches.indices().to_primitive(); let expected_indices = PrimitiveArray::from_iter(vec![0u64, 2048]); assert_arrays_eq!(patch_indices, expected_indices); + #[expect(deprecated)] let patch_values = patches.values().to_primitive(); let expected_values = PrimitiveArray::from_iter(vec![PI, E]); assert_arrays_eq!(patch_values, expected_values); @@ -388,14 +395,17 @@ mod tests { .unwrap(); let patches = encoded.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().clone().unwrap().to_primitive(); let expected_offsets = PrimitiveArray::from_iter(vec![0u64, 1, 1]); assert_arrays_eq!(chunk_offsets, expected_offsets); + #[expect(deprecated)] let patch_indices = patches.indices().to_primitive(); let expected_indices = PrimitiveArray::from_iter(vec![0u64]); assert_arrays_eq!(patch_indices, expected_indices); + #[expect(deprecated)] let patch_values = patches.values().to_primitive(); let expected_values = PrimitiveArray::from_iter(vec![PI]); assert_arrays_eq!(patch_values, expected_values); @@ -416,14 +426,17 @@ mod tests { .unwrap(); let patches = encoded.patches().unwrap(); + #[expect(deprecated)] let chunk_offsets = patches.chunk_offsets().clone().unwrap().to_primitive(); let expected_offsets = PrimitiveArray::from_iter(vec![0u64]); assert_arrays_eq!(chunk_offsets, expected_offsets); + #[expect(deprecated)] let patch_indices = patches.indices().to_primitive(); let expected_indices = PrimitiveArray::from_iter(vec![0u64, 100]); assert_arrays_eq!(patch_indices, expected_indices); + #[expect(deprecated)] let patch_values = patches.values().to_primitive(); let expected_values = PrimitiveArray::from_iter(vec![PI, E]); assert_arrays_eq!(patch_values, expected_values); @@ -526,6 +539,7 @@ mod tests { .unwrap(); let sliced_alp = encoded.slice(512..1024).unwrap(); + #[expect(deprecated)] let decoded = sliced_alp.to_primitive(); let expected_slice = original.slice(512..1024).unwrap(); diff --git a/encodings/alp/src/alp/compute/cast.rs b/encodings/alp/src/alp/compute/cast.rs index 76c0d9ca216..99eaa09ff2c 100644 --- a/encodings/alp/src/alp/compute/cast.rs +++ b/encodings/alp/src/alp/compute/cast.rs @@ -58,11 +58,10 @@ impl CastReduce for ALP { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -82,8 +81,10 @@ mod tests { #[test] fn issue_5766_test_cast_alp_with_patches_to_nullable() -> VortexResult<()> { let values = buffer![1.234f32, f32::NAN, 2.345, f32::INFINITY, 3.456].into_array(); + #[expect(deprecated)] + let values_primitive = values.to_primitive(); let alp = alp_encode( - values.to_primitive().as_view(), + values_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), )?; @@ -98,7 +99,9 @@ mod tests { let expected = values.cast(nullable_dtype)?; - assert_arrays_eq!(casted.to_canonical()?.into_primitive(), expected); + #[expect(deprecated)] + let casted_prim = casted.to_canonical()?.into_primitive(); + assert_arrays_eq!(casted_prim, expected); Ok(()) } @@ -106,8 +109,10 @@ mod tests { #[test] fn test_cast_alp_f32_to_f64() -> VortexResult<()> { let values = buffer![1.5f32, 2.5, 3.5, 4.5].into_array(); + #[expect(deprecated)] + let values_primitive = values.to_primitive(); let alp = alp_encode( - values.to_primitive().as_view(), + values_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), )?; @@ -120,6 +125,7 @@ mod tests { &DType::Primitive(PType::F64, Nullability::NonNullable) ); + #[expect(deprecated)] let decoded = casted.to_canonical()?.into_primitive(); let values = decoded.as_slice::(); assert_eq!(values.len(), 4); @@ -132,8 +138,10 @@ mod tests { #[test] fn test_cast_alp_to_int() -> VortexResult<()> { let values = buffer![1.0f32, 2.0, 3.0, 4.0].into_array(); + #[expect(deprecated)] + let values_primitive = values.to_primitive(); let alp = alp_encode( - values.to_primitive().as_view(), + values_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), )?; @@ -146,6 +154,7 @@ mod tests { &DType::Primitive(PType::I32, Nullability::NonNullable) ); + #[expect(deprecated)] let decoded = casted.to_canonical()?.into_primitive(); assert_arrays_eq!(decoded, PrimitiveArray::from_iter([1i32, 2, 3, 4])); @@ -159,8 +168,10 @@ mod tests { #[case(buffer![42.42f64].into_array())] #[case(buffer![0.0f32, -1.5, 2.5, -3.5, 4.5].into_array())] fn test_cast_alp_conformance(#[case] array: vortex_array::ArrayRef) -> VortexResult<()> { + #[expect(deprecated)] + let array_primitive = array.to_primitive(); let alp = alp_encode( - array.to_primitive().as_view(), + array_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), ) diff --git a/encodings/alp/src/alp/compute/compare.rs b/encodings/alp/src/alp/compute/compare.rs index cc4460595b0..d0eca850b8c 100644 --- a/encodings/alp/src/alp/compute/compare.rs +++ b/encodings/alp/src/alp/compute/compare.rs @@ -150,11 +150,10 @@ where #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -194,10 +193,9 @@ mod tests { ) .unwrap(); assert!(encoded.patches().is_none()); - assert_eq!( - encoded.encoded().to_primitive().as_slice::(), - vec![1234; 1025] - ); + #[expect(deprecated)] + let encoded_prim = encoded.encoded().to_primitive(); + assert_eq!(encoded_prim.as_slice::(), vec![1234; 1025]); let r = alp_scalar_compare(encoded.as_view(), 1.3_f32, CompareOperator::Eq) .unwrap() @@ -222,10 +220,9 @@ mod tests { ) .unwrap(); assert!(encoded.patches().is_none()); - assert_eq!( - encoded.encoded().to_primitive().as_slice::(), - vec![1234; 1025] - ); + #[expect(deprecated)] + let encoded_prim = encoded.encoded().to_primitive(); + assert_eq!(encoded_prim.as_slice::(), vec![1234; 1025]); let r_eq = alp_scalar_compare(encoded.as_view(), 1.234444_f32, CompareOperator::Eq) .unwrap() @@ -250,10 +247,9 @@ mod tests { ) .unwrap(); assert!(encoded.patches().is_none()); - assert_eq!( - encoded.encoded().to_primitive().as_slice::(), - vec![605; 10] - ); + #[expect(deprecated)] + let encoded_prim = encoded.encoded().to_primitive(); + assert_eq!(encoded_prim.as_slice::(), vec![605; 10]); // !(0.0605_f32 >= 0.06051_f32); let r_gte = alp_scalar_compare(encoded.as_view(), 0.06051_f32, CompareOperator::Gte) @@ -294,10 +290,9 @@ mod tests { ) .unwrap(); assert!(encoded.patches().is_none()); - assert_eq!( - encoded.encoded().to_primitive().as_slice::(), - vec![0; 10] - ); + #[expect(deprecated)] + let encoded_prim = encoded.encoded().to_primitive(); + assert_eq!(encoded_prim.as_slice::(), vec![0; 10]); let r_gte = test_alp_compare(encoded.as_view(), -0.00000001_f32, CompareOperator::Gte).unwrap(); diff --git a/encodings/alp/src/alp/compute/filter.rs b/encodings/alp/src/alp/compute/filter.rs index 1c3cf1efb41..2843e72f8e1 100644 --- a/encodings/alp/src/alp/compute/filter.rs +++ b/encodings/alp/src/alp/compute/filter.rs @@ -41,12 +41,11 @@ impl FilterKernel for ALP { #[cfg(test)] mod test { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -65,8 +64,10 @@ mod test { 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0 ].into_array())] fn test_filter_alp_conformance(#[case] array: ArrayRef) { + #[expect(deprecated)] + let array_primitive = array.to_primitive(); let alp = alp_encode( - array.to_primitive().as_view(), + array_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), ) diff --git a/encodings/alp/src/alp/compute/mask.rs b/encodings/alp/src/alp/compute/mask.rs index 18dd99554e5..2123e4d85f8 100644 --- a/encodings/alp/src/alp/compute/mask.rs +++ b/encodings/alp/src/alp/compute/mask.rs @@ -54,11 +54,10 @@ impl MaskKernel for ALP { #[cfg(test)] mod test { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -81,8 +80,10 @@ mod test { 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0 ].into_array())] fn test_mask_alp_conformance(#[case] array: vortex_array::ArrayRef) { + #[expect(deprecated)] + let array_primitive = array.to_primitive(); let alp = alp_encode( - array.to_primitive().as_view(), + array_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), ) diff --git a/encodings/alp/src/alp/compute/take.rs b/encodings/alp/src/alp/compute/take.rs index 792eae732f2..daeead2a4d0 100644 --- a/encodings/alp/src/alp/compute/take.rs +++ b/encodings/alp/src/alp/compute/take.rs @@ -40,11 +40,10 @@ impl TakeExecute for ALP { #[cfg(test)] mod test { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -59,8 +58,10 @@ mod test { #[case(PrimitiveArray::from_option_iter([Some(1.1f32), None, Some(2.2), Some(3.3), None]).into_array())] #[case(buffer![42.42f64].into_array())] fn test_take_alp_conformance(#[case] array: vortex_array::ArrayRef) { + #[expect(deprecated)] + let array_primitive = array.to_primitive(); let alp = alp_encode( - array.to_primitive().as_view(), + array_primitive.as_view(), None, &mut LEGACY_SESSION.create_execution_ctx(), ) diff --git a/encodings/alp/src/alp_rd/array.rs b/encodings/alp/src/alp_rd/array.rs index 92db50770f2..a9bce5c7f78 100644 --- a/encodings/alp/src/alp_rd/array.rs +++ b/encodings/alp/src/alp_rd/array.rs @@ -660,10 +660,9 @@ impl ValidityChild for ALPRD { #[cfg(test)] mod test { - #![expect(deprecated)] - use prost::Message; use rstest::rstest; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -697,6 +696,7 @@ mod test { let rd_array = encoder.encode(real_array.as_view()); + #[expect(deprecated)] let decoded = rd_array.as_array().to_primitive(); assert_arrays_eq!(decoded, PrimitiveArray::from_option_iter(reals)); diff --git a/encodings/alp/src/alp_rd/compute/cast.rs b/encodings/alp/src/alp_rd/compute/cast.rs index 36b34f82b6c..69d3252ba89 100644 --- a/encodings/alp/src/alp_rd/compute/cast.rs +++ b/encodings/alp/src/alp_rd/compute/cast.rs @@ -48,10 +48,9 @@ impl CastReduce for ALPRD { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::builtins::ArrayBuiltins; @@ -78,6 +77,7 @@ mod tests { &DType::Primitive(PType::F64, Nullability::NonNullable) ); + #[expect(deprecated)] let decoded = casted.to_primitive(); let f64_values = decoded.as_slice::(); assert_eq!(f64_values.len(), 5); diff --git a/encodings/alp/src/alp_rd/compute/take.rs b/encodings/alp/src/alp_rd/compute/take.rs index 8d9f383df71..fac46e74d02 100644 --- a/encodings/alp/src/alp_rd/compute/take.rs +++ b/encodings/alp/src/alp_rd/compute/take.rs @@ -56,10 +56,9 @@ impl TakeExecute for ALPRD { #[cfg(test)] mod test { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -88,6 +87,7 @@ mod test { .is_unsigned_int() ); + #[expect(deprecated)] let taken = encoded .take(buffer![0, 2].into_array()) .unwrap() @@ -112,6 +112,7 @@ mod test { .is_unsigned_int() ); + #[expect(deprecated)] let taken = encoded .take(PrimitiveArray::from_option_iter([Some(0), Some(2), None]).into_array()) .unwrap() diff --git a/encodings/datetime-parts/src/compress.rs b/encodings/datetime-parts/src/compress.rs index 96d8c354c48..bc25f0eb999 100644 --- a/encodings/datetime-parts/src/compress.rs +++ b/encodings/datetime-parts/src/compress.rs @@ -83,10 +83,10 @@ impl TryFrom for DateTimePartsData { #[cfg(test)] mod tests { - #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -123,23 +123,27 @@ mod tests { } = split_temporal(temporal_array).unwrap(); let mut ctx = LEGACY_SESSION.create_execution_ctx(); + #[expect(deprecated)] + let days_prim = days.to_primitive(); assert!( - days.to_primitive() + days_prim .validity() .vortex_expect("days validity should be derivable") .mask_eq(&validity, &mut ctx) .unwrap() ); + #[expect(deprecated)] + let seconds_prim = seconds.to_primitive(); assert!(matches!( - seconds - .to_primitive() + seconds_prim .validity() .vortex_expect("seconds validity should be derivable"), Validity::NonNullable )); + #[expect(deprecated)] + let subseconds_prim = subseconds.to_primitive(); assert!(matches!( - subseconds - .to_primitive() + subseconds_prim .validity() .vortex_expect("subseconds validity should be derivable"), Validity::NonNullable diff --git a/encodings/datetime-parts/src/compute/cast.rs b/encodings/datetime-parts/src/compute/cast.rs index af32d0d988a..e654c022be1 100644 --- a/encodings/datetime-parts/src/compute/cast.rs +++ b/encodings/datetime-parts/src/compute/cast.rs @@ -33,10 +33,11 @@ impl CastReduce for DateTimeParts { #[cfg(test)] mod tests { - #![expect(deprecated)] use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; + #[expect(deprecated)] + use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::TemporalArray; use vortex_array::builtins::ArrayBuiltins; @@ -92,12 +93,14 @@ mod tests { fn test_bad_cast_fails(#[case] validity: Validity) { let array = date_time_array(validity); // Cast to incompatible type - force evaluation via to_canonical + #[expect(deprecated)] let result = array .cast(DType::Bool(Nullability::NonNullable)) .and_then(|a| a.to_canonical().map(|c| c.into_array())); assert!(result.is_err(), "Expected error, got: {result:?}"); // Cast nullable with nulls to non-nullable - force evaluation via to_canonical + #[expect(deprecated)] let result = array .cast(array.dtype().with_nullability(Nullability::NonNullable)) .and_then(|a| a.to_canonical().map(|c| c.into_array())); diff --git a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs index 6bb1359f7e9..30d7bcd9a5f 100644 --- a/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs +++ b/encodings/decimal-byte-parts/src/decimal_byte_parts/compute/cast.rs @@ -45,10 +45,9 @@ impl CastReduce for DecimalByteParts { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::builtins::ArrayBuiltins; @@ -79,6 +78,7 @@ mod tests { ); // Verify the values are preserved + #[expect(deprecated)] let decoded = casted.to_decimal(); assert_eq!(decoded.len(), 4); } @@ -93,6 +93,7 @@ mod tests { .unwrap(); // Cast to non-nullable should fail due to nulls - force evaluation via to_canonical + #[expect(deprecated)] let result = array .into_array() .cast(DType::Decimal(decimal_dtype, Nullability::NonNullable)) diff --git a/encodings/fastlanes/src/delta/array/delta_compress.rs b/encodings/fastlanes/src/delta/array/delta_compress.rs index 72403c5e8ab..c13e9f60d4c 100644 --- a/encodings/fastlanes/src/delta/array/delta_compress.rs +++ b/encodings/fastlanes/src/delta/array/delta_compress.rs @@ -92,11 +92,11 @@ where #[cfg(test)] mod tests { - #![expect(deprecated)] use std::sync::LazyLock; use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -145,6 +145,8 @@ mod tests { array.len(), ) .vortex_expect("Delta array construction should succeed"); - assert_arrays_eq!(packed_delta.as_array().to_primitive(), array); + #[expect(deprecated)] + let packed_delta_prim = packed_delta.as_array().to_primitive(); + assert_arrays_eq!(packed_delta_prim, array); } } diff --git a/encodings/fastlanes/src/rle/array/rle_compress.rs b/encodings/fastlanes/src/rle/array/rle_compress.rs index eb81ceb00e6..a73e8ac10de 100644 --- a/encodings/fastlanes/src/rle/array/rle_compress.rs +++ b/encodings/fastlanes/src/rle/array/rle_compress.rs @@ -151,9 +151,9 @@ fn padded_validity(array: &PrimitiveArray) -> Validity { #[cfg(test)] mod tests { - #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::ConstantArray; use vortex_array::arrays::MaskedArray; @@ -174,6 +174,7 @@ mod tests { let encoded_u8 = RLEData::encode(PrimitiveArray::new(array_u8, Validity::NonNullable).as_view()) .unwrap(); + #[expect(deprecated)] let decoded_u8 = encoded_u8.as_array().to_primitive(); let expected_u8 = PrimitiveArray::from_iter(vec![1u8, 1, 2, 2, 3, 3]); assert_arrays_eq!(decoded_u8, expected_u8); @@ -183,6 +184,7 @@ mod tests { let encoded_u16 = RLEData::encode(PrimitiveArray::new(array_u16, Validity::NonNullable).as_view()) .unwrap(); + #[expect(deprecated)] let decoded_u16 = encoded_u16.as_array().to_primitive(); let expected_u16 = PrimitiveArray::from_iter(vec![100u16, 100, 200, 200]); assert_arrays_eq!(decoded_u16, expected_u16); @@ -192,6 +194,7 @@ mod tests { let encoded_u64 = RLEData::encode(PrimitiveArray::new(array_u64, Validity::NonNullable).as_view()) .unwrap(); + #[expect(deprecated)] let decoded_u64 = encoded_u64.as_array().to_primitive(); let expected_u64 = PrimitiveArray::from_iter(vec![1000u64, 1000, 2000]); assert_arrays_eq!(decoded_u64, expected_u64); @@ -223,6 +226,7 @@ mod tests { RLEData::encode(PrimitiveArray::new(values, Validity::NonNullable).as_view()).unwrap(); assert_eq!(encoded.values().len(), 2); // 2 chunks, each storing value 42 + #[expect(deprecated)] let decoded = encoded.as_array().to_primitive(); // Verify round-trip let expected = PrimitiveArray::from_iter(vec![42u16; 2000]); assert_arrays_eq!(decoded, expected); @@ -236,6 +240,7 @@ mod tests { RLEData::encode(PrimitiveArray::new(values, Validity::NonNullable).as_view()).unwrap(); assert_eq!(encoded.values().len(), 256); + #[expect(deprecated)] let decoded = encoded.as_array().to_primitive(); // Verify round-trip let expected = PrimitiveArray::from_iter((0u8..=255).collect::>()); assert_arrays_eq!(decoded, expected); @@ -281,8 +286,10 @@ mod tests { #[case::f32((-2000..2000).map(|i| i as f32).collect::>())] #[case::f64((-2000..2000).map(|i| i as f64).collect::>())] fn test_roundtrip_primitive_types(#[case] values: Buffer) { + #[expect(deprecated)] let primitive = values.clone().into_array().to_primitive(); let result = RLEData::encode(primitive.as_view()).unwrap(); + #[expect(deprecated)] let decoded = result.as_array().to_primitive(); let expected = PrimitiveArray::new( values, @@ -300,6 +307,7 @@ mod tests { /// fill-forward default at index 0 and the actual value at index 1), which /// holds whenever the first position of each chunk is null. fn with_masked_constant_indices(rle: &RLEArray) -> VortexResult { + #[expect(deprecated)] let indices_prim = rle.indices().to_primitive(); let masked_indices = MaskedArray::try_new( ConstantArray::new(1u16, indices_prim.len()).into_array(), @@ -377,6 +385,7 @@ mod tests { /// positions, which can happen when indices are further compressed and the /// compressor clobbers invalid entries with arbitrary data. fn with_random_invalid_indices(rle: &RLEArray) -> VortexResult { + #[expect(deprecated)] let indices_prim = rle.indices().to_primitive(); let mut indices_data: Vec = indices_prim.as_slice::().to_vec(); @@ -482,6 +491,7 @@ mod tests { fn test_float_zeros(#[case] values: Vec) { let primitive = PrimitiveArray::from_iter(values); let rle = RLEData::encode(primitive.as_view()).unwrap(); + #[expect(deprecated)] let decoded = rle.as_array().to_primitive(); assert_arrays_eq!(primitive, decoded); } diff --git a/encodings/fastlanes/src/rle/compute/cast.rs b/encodings/fastlanes/src/rle/compute/cast.rs index 6cd43cd93c1..a276fdf5e63 100644 --- a/encodings/fastlanes/src/rle/compute/cast.rs +++ b/encodings/fastlanes/src/rle/compute/cast.rs @@ -44,9 +44,10 @@ impl CastReduce for RLE { #[cfg(test)] mod tests { - #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] + use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; use vortex_array::builtins::ArrayBuiltins; @@ -87,11 +88,12 @@ mod tests { Validity::from_iter([true, false, true, true, false]), ); let encoded = rle(&primitive); - encoded + #[expect(deprecated)] + let result = encoded .into_array() .cast(DType::Primitive(PType::U8, Nullability::NonNullable)) - .and_then(|a| a.to_canonical().map(|c| c.into_array())) - .unwrap(); + .and_then(|a| a.to_canonical().map(|c| c.into_array())); + result.unwrap(); } #[rstest] diff --git a/encodings/runend/src/compute/cast.rs b/encodings/runend/src/compute/cast.rs index 1ec5b12585c..4e134195d0e 100644 --- a/encodings/runend/src/compute/cast.rs +++ b/encodings/runend/src/compute/cast.rs @@ -33,10 +33,10 @@ impl CastReduce for RunEnd { #[cfg(test)] mod tests { - #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -70,6 +70,7 @@ mod tests { ); // Verify by decoding to canonical form + #[expect(deprecated)] let decoded = casted.to_primitive(); // RunEnd encoding should expand to [100, 100, 100, 200, 200, 100, 100, 100, 300, 300] assert_eq!(decoded.len(), 10); diff --git a/encodings/sequence/src/compute/cast.rs b/encodings/sequence/src/compute/cast.rs index 09479b36eb9..b53e7188c52 100644 --- a/encodings/sequence/src/compute/cast.rs +++ b/encodings/sequence/src/compute/cast.rs @@ -87,9 +87,9 @@ impl CastReduce for Sequence { #[cfg(test)] mod tests { - #![expect(deprecated)] use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -131,6 +131,7 @@ mod tests { ); // Verify the values + #[expect(deprecated)] let decoded = casted.to_primitive(); assert_arrays_eq!(decoded, PrimitiveArray::from_iter([100i64, 110, 120, 130])); } @@ -150,6 +151,7 @@ mod tests { ); // Verify the values + #[expect(deprecated)] let decoded = casted.to_primitive(); assert_arrays_eq!( decoded, @@ -173,6 +175,7 @@ mod tests { ); // Verify the values were correctly converted + #[expect(deprecated)] let decoded = casted.to_primitive(); assert_arrays_eq!( decoded, diff --git a/encodings/sparse/src/canonical.rs b/encodings/sparse/src/canonical.rs index 86c078a3065..024975a4e76 100644 --- a/encodings/sparse/src/canonical.rs +++ b/encodings/sparse/src/canonical.rs @@ -560,14 +560,13 @@ fn execute_varbin_inner( #[cfg(test)] mod test { - #![expect(deprecated)] - use std::sync::Arc; use rstest::rstest; use vortex_array::Canonical; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -609,6 +608,7 @@ mod test { let indices = buffer![0u64, 1, 7].into_array(); let values = BoolArray::from_iter([Some(true), None, Some(false)]).into_array(); let sparse_bools = Sparse::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); + #[expect(deprecated)] let actual = sparse_bools.as_array().to_bool(); let expected = BoolArray::from_iter([ @@ -637,6 +637,7 @@ mod test { let sparse_ints = Sparse::try_new(indices, values, 10, Scalar::from(fill_value)).unwrap(); assert_eq!(*sparse_ints.dtype(), DType::Primitive(PType::I32, Nullable)); + #[expect(deprecated)] let flat_ints = sparse_ints.as_array().to_primitive(); let expected = PrimitiveArray::from_option_iter([ Some(0i32), @@ -720,6 +721,7 @@ mod test { .unwrap() .into_array(); + #[expect(deprecated)] let actual = sparse_struct.as_array().to_struct(); assert_arrays_eq!(actual, expected); } @@ -787,6 +789,7 @@ mod test { .unwrap() .into_array(); + #[expect(deprecated)] let actual = sparse_struct.as_array().to_struct(); assert_arrays_eq!(actual, expected); } @@ -815,6 +818,7 @@ mod test { .into_arrow_preferred() .unwrap(); + #[expect(deprecated)] let actual = sparse_struct .as_array() .to_decimal() @@ -847,6 +851,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let actual = array.as_array().to_varbinview().into_array(); let expected = >::from_iter([ Some("hello"), @@ -888,6 +893,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let actual = array.as_array().to_varbinview().into_array(); let expected = >::from_iter([ Some("hello"), @@ -922,6 +928,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let actual = array.as_array().to_varbinview().into_array(); let expected = VarBinViewArray::from_iter_str([ "hello", "123", "123", "goodbye", "hello", "bonjour", "123", "123", "你好", @@ -952,6 +959,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let actual = array.as_array().to_varbinview().into_array(); let expected = >::from_iter([ Some("hello"), @@ -993,6 +1001,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let actual = array.as_array().to_varbinview().into_array(); let expected = VarBinViewArray::from_iter_nullable_bin([ Some(b"hello" as &[u8]), @@ -1039,6 +1048,7 @@ mod test { let actual = sparse .execute::(&mut LEGACY_SESSION.create_execution_ctx())? .into_array(); + #[expect(deprecated)] let result_listview = actual.to_listview(); // Check the structure @@ -1053,6 +1063,7 @@ mod test { assert_eq!(result_listview.size_at(5), 1); // [2] // Verify actual values + #[expect(deprecated)] let elements_array = result_listview.elements().to_primitive(); let elements_slice = elements_array.as_slice::(); @@ -1096,6 +1107,7 @@ mod test { .execute::(&mut LEGACY_SESSION.create_execution_ctx()) .vortex_expect("no fail") .into_array(); + #[expect(deprecated)] let result_listview = actual.to_listview(); // Check the structure @@ -1110,6 +1122,7 @@ mod test { assert_eq!(result_listview.size_at(5), 1); // [2] - extra element beyond original slice // Verify actual values + #[expect(deprecated)] let elements_array = result_listview.elements().to_primitive(); let elements_slice = elements_array.as_slice::(); @@ -1141,6 +1154,7 @@ mod test { let actual = sparse .execute::(&mut LEGACY_SESSION.create_execution_ctx())? .into_array(); + #[expect(deprecated)] let result_listview = actual.to_listview(); // Check the structure @@ -1155,6 +1169,7 @@ mod test { assert_eq!(result_listview.size_at(5), 1); // [2] from sparse // Verify actual values + #[expect(deprecated)] let elements_array = result_listview.elements().to_primitive(); let elements_slice = elements_array.as_slice::(); @@ -1213,6 +1228,7 @@ mod test { ) .unwrap(); + #[expect(deprecated)] let actual = array.as_array().to_varbinview().into_array(); let expected = VarBinViewArray::from_iter_nullable_bin([ Some(b"hello" as &[u8]), @@ -1481,8 +1497,10 @@ mod test { .unwrap() .into_array(); + #[expect(deprecated)] + let actual_listview = actual.to_listview(); assert_eq!( - actual.to_listview().offsets().dtype(), + actual_listview.offsets().dtype(), &DType::Primitive(PType::U16, NonNullable) ); assert_arrays_eq!(&actual, &expected); @@ -1541,6 +1559,7 @@ mod test { .into_array() .execute::(&mut LEGACY_SESSION.create_execution_ctx())? .into_array(); + #[expect(deprecated)] let result_listview = canonical.to_listview(); // Verify the structure @@ -1553,6 +1572,7 @@ mod test { if size == 0 { vec![] // null/empty list } else { + #[expect(deprecated)] let elements = result_listview.elements().to_primitive(); let slice = elements.as_slice::(); slice[offset..offset + size].to_vec() @@ -1623,6 +1643,7 @@ mod test { .into_array() .execute::(&mut LEGACY_SESSION.create_execution_ctx())? .into_array(); + #[expect(deprecated)] let result_listview = canonical.to_listview(); assert_eq!(result_listview.len(), 5); @@ -1634,6 +1655,7 @@ mod test { if size == 0 { vec![] // null/empty list } else { + #[expect(deprecated)] let elements = result_listview.elements().to_primitive(); let slice = elements.as_slice::(); slice[offset..offset + size].to_vec() diff --git a/encodings/sparse/src/compute/cast.rs b/encodings/sparse/src/compute/cast.rs index de8195b69b5..4eccd273090 100644 --- a/encodings/sparse/src/compute/cast.rs +++ b/encodings/sparse/src/compute/cast.rs @@ -34,10 +34,9 @@ impl CastReduce for Sparse { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -72,7 +71,9 @@ mod tests { ); let expected = PrimitiveArray::from_iter([0i64, 0, 100, 0, 0, 200, 0, 0, 300, 0]); - assert_arrays_eq!(casted.to_primitive(), expected); + #[expect(deprecated)] + let casted_primitive = casted.to_primitive(); + assert_arrays_eq!(casted_primitive, expected); } #[test] @@ -148,7 +149,9 @@ mod tests { ); let expected = PrimitiveArray::from_iter([10u64, 20, 30, 40, 50]); - assert_arrays_eq!(casted.to_primitive(), expected); + #[expect(deprecated)] + let casted_primitive = casted.to_primitive(); + assert_arrays_eq!(casted_primitive, expected); Ok(()) } diff --git a/encodings/sparse/src/ops.rs b/encodings/sparse/src/ops.rs index daee930a4b5..28bfd6d85bd 100644 --- a/encodings/sparse/src/ops.rs +++ b/encodings/sparse/src/ops.rs @@ -24,9 +24,8 @@ impl OperationsVTable for Sparse { #[cfg(test)] mod tests { - #![expect(deprecated)] - use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -44,6 +43,7 @@ mod tests { let mut expected = vec![999u64; 1000]; expected[0] = 0; + #[expect(deprecated)] let values = sliced.to_primitive(); assert_arrays_eq!(values, PrimitiveArray::from_iter(expected)); } diff --git a/encodings/zigzag/src/compute/mod.rs b/encodings/zigzag/src/compute/mod.rs index 4f2abcfca7a..4552506077c 100644 --- a/encodings/zigzag/src/compute/mod.rs +++ b/encodings/zigzag/src/compute/mod.rs @@ -70,12 +70,11 @@ impl ZigZagEncoded for u64 { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::PrimitiveArray; @@ -190,7 +189,9 @@ mod tests { fn test_take_zigzag_conformance(#[case] array: ArrayRef) -> VortexResult<()> { use vortex_array::compute::conformance::take::test_take_conformance; - let zigzag = zigzag_encode(array.to_primitive().as_view())?; + #[expect(deprecated)] + let array_primitive = array.to_primitive(); + let zigzag = zigzag_encode(array_primitive.as_view())?; test_take_conformance(&zigzag.into_array()); Ok(()) } diff --git a/encodings/zstd/src/compute/cast.rs b/encodings/zstd/src/compute/cast.rs index 4ea6141af1a..508fcd6231d 100644 --- a/encodings/zstd/src/compute/cast.rs +++ b/encodings/zstd/src/compute/cast.rs @@ -86,10 +86,9 @@ impl CastReduce for Zstd { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; @@ -117,6 +116,7 @@ mod tests { &DType::Primitive(PType::I64, Nullability::NonNullable) ); + #[expect(deprecated)] let decoded = casted.to_primitive(); assert_arrays_eq!(decoded, PrimitiveArray::from_iter([1i64, 2, 3, 4, 5])); } @@ -152,6 +152,7 @@ mod tests { &DType::Primitive(PType::U32, Nullability::NonNullable) ); // Verify the values are correct + #[expect(deprecated)] let decoded = casted.to_primitive(); assert_arrays_eq!(decoded, PrimitiveArray::from_iter([20u32, 30, 40, 50])); } @@ -175,6 +176,7 @@ mod tests { casted.dtype(), &DType::Primitive(PType::U32, Nullability::NonNullable) ); + #[expect(deprecated)] let decoded = casted.to_primitive(); let expected = PrimitiveArray::from_iter([20u32, 30, 40, 50]); assert_arrays_eq!(decoded, expected); diff --git a/vortex-array/src/arrays/bool/compute/fill_null.rs b/vortex-array/src/arrays/bool/compute/fill_null.rs index e909a100ced..59b9ca0b717 100644 --- a/vortex-array/src/arrays/bool/compute/fill_null.rs +++ b/vortex-array/src/arrays/bool/compute/fill_null.rs @@ -43,8 +43,6 @@ impl FillNullKernel for Bool { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_buffer::BitBuffer; use vortex_buffer::bitbuffer; @@ -53,6 +51,7 @@ mod tests { use crate::arrays::BoolArray; use crate::arrays::bool::BoolArrayExt; use crate::builtins::ArrayBuiltins; + #[expect(deprecated)] use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; @@ -67,6 +66,7 @@ mod tests { BitBuffer::from_iter([true, true, false, false]), Validity::from_iter([true, false, true, false]), ); + #[expect(deprecated)] let non_null_array = bool_array .into_array() .fill_null(Scalar::from(fill_value)) diff --git a/vortex-array/src/arrays/datetime/test.rs b/vortex-array/src/arrays/datetime/test.rs index 6919afc6c0f..2b1a681e7fb 100644 --- a/vortex-array/src/arrays/datetime/test.rs +++ b/vortex-array/src/arrays/datetime/test.rs @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributorsuse crate::dtype::Nullability; -#![expect(deprecated)] use rstest::rstest; use vortex_buffer::buffer; @@ -9,6 +8,7 @@ use vortex_error::VortexResult; use crate::IntoArray; use crate::Precision; +#[expect(deprecated)] use crate::ToCanonical as _; use crate::arrays::PrimitiveArray; use crate::arrays::datetime::TemporalData; @@ -196,11 +196,10 @@ fn test_validity_preservation(#[case] validity: Validity) { let temporal_array = TemporalData::new_timestamp(milliseconds, TimeUnit::Milliseconds, Some("UTC".into())); + #[expect(deprecated)] + let prim = temporal_array.temporal_values().to_primitive(); assert!( - temporal_array - .temporal_values() - .to_primitive() - .validity() + prim.validity() .vortex_expect("temporal validity should be derivable") .array_eq(&validity, Precision::Ptr) ); diff --git a/vortex-array/src/arrays/listview/tests/operations.rs b/vortex-array/src/arrays/listview/tests/operations.rs index 9fdc25dc77f..235caf53caa 100644 --- a/vortex-array/src/arrays/listview/tests/operations.rs +++ b/vortex-array/src/arrays/listview/tests/operations.rs @@ -1,6 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -#![expect(deprecated)] use std::sync::Arc; @@ -13,6 +12,7 @@ use super::common::create_large_listview; use super::common::create_nullable_listview; use crate::IntoArray; use crate::LEGACY_SESSION; +#[expect(deprecated)] use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::aggregate_fn::fns::is_constant::is_constant; @@ -252,6 +252,7 @@ fn test_cast_numeric_types(#[case] from_ptype: PType, #[case] to_ptype: PType) { let result = listview.cast(target_dtype.clone()).unwrap(); assert_eq!(result.dtype(), &target_dtype); + #[expect(deprecated)] let result_list = result.to_listview(); assert!( result_list.len() == 3 || result_list.len() == 2, @@ -288,6 +289,7 @@ fn test_cast_with_nulls() { let result = listview.cast(target_dtype.clone()).unwrap(); assert_eq!(result.dtype(), &target_dtype); + #[expect(deprecated)] let result_list = result.to_listview(); assert!( result_list @@ -338,6 +340,7 @@ fn test_cast_special_patterns(#[case] expected_sizes: Vec, #[case] list_c }; let result = listview.cast(target_dtype).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), list_count); @@ -370,6 +373,7 @@ fn test_cast_large_dataset() { ); let result = listview.cast(target_dtype).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 20); @@ -538,6 +542,7 @@ fn test_mask_preserves_structure() { let result = listview.mask((!&selection).into_array()).unwrap(); assert_eq!(result.len(), 4); // Length is preserved. + #[expect(deprecated)] let result_list = result.to_listview(); // Check validity: true in selection means null. @@ -591,6 +596,7 @@ fn test_mask_with_existing_nulls() { // Mask additional elements. let selection = Mask::from_iter([false, true, true]); let result = listview.mask((!&selection).into_array()).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); // Check combined validity: @@ -623,6 +629,7 @@ fn test_mask_with_gaps() { let selection = Mask::from_iter([true, false, false]); let result = listview.mask((!&selection).into_array()).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 3); @@ -667,6 +674,7 @@ fn test_mask_constant_arrays() { let selection = Mask::from_iter([false, true, false]); let result = const_list.mask((!&selection).into_array()).unwrap(); + #[expect(deprecated)] let result_list = result.to_listview(); assert_eq!(result_list.len(), 3); diff --git a/vortex-array/src/arrays/varbin/vtable/canonical.rs b/vortex-array/src/arrays/varbin/vtable/canonical.rs index 1c9369b51df..fc30ee2c94e 100644 --- a/vortex-array/src/arrays/varbin/vtable/canonical.rs +++ b/vortex-array/src/arrays/varbin/vtable/canonical.rs @@ -45,8 +45,6 @@ pub(crate) fn varbin_to_canonical( #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use crate::LEGACY_SESSION; @@ -55,6 +53,7 @@ mod tests { use crate::arrays::VarBinViewArray; use crate::arrays::varbin::builder::VarBinBuilder; use crate::assert_arrays_eq; + #[expect(deprecated)] use crate::canonical::ToCanonical as _; use crate::dtype::DType; use crate::dtype::Nullability; @@ -74,6 +73,7 @@ mod tests { let varbin = varbin.slice(1..4).unwrap(); + #[expect(deprecated)] let canonical = varbin.to_varbinview(); assert_eq!(canonical.dtype(), &dtype); @@ -97,6 +97,7 @@ mod tests { #[case(DType::Binary(Nullability::NonNullable))] fn test_canonical_varbin_unsliced(#[case] dtype: DType) { let varbin = VarBinArray::from_iter_nonnull(["foo", "bar", "baz"], dtype.clone()); + #[expect(deprecated)] let canonical = varbin.as_array().to_varbinview(); let expected = match dtype { DType::Utf8(_) => VarBinViewArray::from_iter_str(["foo", "bar", "baz"]), @@ -110,6 +111,7 @@ mod tests { fn test_canonical_varbin_empty() { let varbin = VarBinArray::from_iter_nonnull([] as [&str; 0], DType::Utf8(Nullability::NonNullable)); + #[expect(deprecated)] let canonical = varbin.as_array().to_varbinview(); assert_eq!(canonical.len(), 0); } diff --git a/vortex-array/src/scalar_fn/fns/between/mod.rs b/vortex-array/src/scalar_fn/fns/between/mod.rs index d9f6796f309..127985af93a 100644 --- a/vortex-array/src/scalar_fn/fns/between/mod.rs +++ b/vortex-array/src/scalar_fn/fns/between/mod.rs @@ -324,14 +324,13 @@ impl ScalarFnVTable for Between { #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use vortex_buffer::buffer; use super::*; use crate::IntoArray; use crate::LEGACY_SESSION; + #[expect(deprecated)] use crate::ToCanonical as _; use crate::VortexSessionExecute; use crate::arrays::BoolArray; @@ -389,6 +388,7 @@ mod tests { let array = buffer![1, 0, 1, 0, 1].into_array(); let upper = buffer![2, 1, 1, 0, 0].into_array(); + #[expect(deprecated)] let matches = between_canonical( &array, &lower, @@ -418,6 +418,7 @@ mod tests { ) .into_array(); + #[expect(deprecated)] let matches = between_canonical( &array, &lower, @@ -436,6 +437,7 @@ mod tests { // upper is a fixed constant let upper = ConstantArray::new(Scalar::from(2), 5).into_array(); + #[expect(deprecated)] let matches = between_canonical( &array, &lower, @@ -454,6 +456,7 @@ mod tests { // lower is also a constant let lower = ConstantArray::new(Scalar::from(0), 5).into_array(); + #[expect(deprecated)] let matches = between_canonical( &array, &lower, diff --git a/vortex-array/src/scalar_fn/fns/binary/boolean.rs b/vortex-array/src/scalar_fn/fns/binary/boolean.rs index a752d619edd..10d37202f64 100644 --- a/vortex-array/src/scalar_fn/fns/binary/boolean.rs +++ b/vortex-array/src/scalar_fn/fns/binary/boolean.rs @@ -102,8 +102,6 @@ fn constant_boolean( #[cfg(test)] mod tests { - #![expect(deprecated)] - use rstest::rstest; use crate::ArrayRef; @@ -112,6 +110,7 @@ mod tests { use crate::VortexSessionExecute; use crate::arrays::BoolArray; use crate::builtins::ArrayBuiltins; + #[expect(deprecated)] use crate::canonical::ToCanonical as _; use crate::scalar_fn::fns::operators::Operator; @@ -126,6 +125,7 @@ mod tests { )] fn test_or(#[case] lhs: ArrayRef, #[case] rhs: ArrayRef) { let r = lhs.binary(rhs, Operator::Or).unwrap(); + #[expect(deprecated)] let r = r.to_bool().into_array(); let v0 = r @@ -165,6 +165,7 @@ mod tests { BoolArray::from_iter([Some(true), Some(true), Some(false), Some(false)]).into_array(), )] fn test_and(#[case] lhs: ArrayRef, #[case] rhs: ArrayRef) { + #[expect(deprecated)] let r = lhs .binary(rhs, Operator::And) .unwrap() diff --git a/vortex-duckdb/src/convert/vector.rs b/vortex-duckdb/src/convert/vector.rs index 0d73b3c6393..70c6b60128d 100644 --- a/vortex-duckdb/src/convert/vector.rs +++ b/vortex-duckdb/src/convert/vector.rs @@ -373,10 +373,10 @@ pub fn data_chunk_to_vortex( #[cfg(test)] mod tests { - #![expect(deprecated)] use std::ffi::CString; use vortex::array::LEGACY_SESSION; + #[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::VortexSessionExecute; use vortex::array::arrays::BoolArray; @@ -430,6 +430,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); let vortex_array = TemporalArray::try_from(result).unwrap(); + #[expect(deprecated)] let vortex_values = vortex_array.temporal_values().to_primitive(); let values_slice = vortex_values.as_slice::(); @@ -453,6 +454,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); let vortex_array = TemporalArray::try_from(result).unwrap(); + #[expect(deprecated)] let vortex_values = vortex_array.temporal_values().to_primitive(); let values_slice = vortex_values.as_slice::(); @@ -476,6 +478,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); let vortex_array = TemporalArray::try_from(result).unwrap(); + #[expect(deprecated)] let vortex_values = vortex_array.temporal_values().to_primitive(); let values_slice = vortex_values.as_slice::(); @@ -504,6 +507,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); let vortex_array = TemporalArray::try_from(result).unwrap(); + #[expect(deprecated)] let vortex_values = vortex_array.temporal_values().to_primitive(); let values_slice = vortex_values.as_slice::(); @@ -546,6 +550,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); let vortex_array = TemporalArray::try_from(result).unwrap(); + #[expect(deprecated)] let vortex_values = vortex_array.temporal_values().to_primitive(); let values_slice = vortex_values.as_slice::(); @@ -569,6 +574,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); let vortex_array = TemporalArray::try_from(result).unwrap(); + #[expect(deprecated)] let vortex_values = vortex_array.temporal_values().to_primitive(); let values_slice = vortex_values.as_slice::(); @@ -591,6 +597,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_bool(); let expected = BoolArray::new(BitBuffer::from(values), Validity::AllValid); assert_arrays_eq!(vortex_array, expected); @@ -617,6 +624,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_primitive(); let vortex_slice = vortex_array.as_slice::(); @@ -659,6 +667,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_listview(); assert_eq!(vortex_array.len(), len); @@ -687,6 +696,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_fixed_size_list(); assert_eq!(vortex_array.len(), len); @@ -705,6 +715,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_struct(); assert_eq!(vortex_array.len(), len); @@ -740,6 +751,7 @@ mod tests { // Test conversion let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_struct(); assert_eq!(vortex_array.len(), len); @@ -789,6 +801,7 @@ mod tests { // Test conversion - the old bug would compute child length as 0+0=0 instead of // max(4,0)=4. let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_listview(); assert_eq!(vortex_array.len(), len); @@ -842,6 +855,7 @@ mod tests { // Test conversion - the old bug would compute child length as 0+2=2 instead of // max(4,2)=4. let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_listview(); assert_eq!(vortex_array.len(), len); @@ -897,6 +911,7 @@ mod tests { // Test conversion. The old code would compute child_min_length as 9999+9999=19998, which // would panic when trying to read that much data from the child vector. let result = flat_vector_to_vortex(&vector, len).unwrap(); + #[expect(deprecated)] let vortex_array = result.to_listview(); assert_eq!(vortex_array.len(), len); @@ -912,7 +927,9 @@ mod tests { ); // Verify the null entry has sanitized offset/size (offset=2, size=0) rather than garbage. + #[expect(deprecated)] let offsets = vortex_array.offsets().to_primitive(); + #[expect(deprecated)] let sizes = vortex_array.sizes().to_primitive(); assert_eq!(offsets.as_slice::()[1], 2); // Previous end (0+2). assert_eq!(sizes.as_slice::()[1], 0); diff --git a/vortex-ffi/src/expression.rs b/vortex-ffi/src/expression.rs index 1090d142551..37f9b602cae 100644 --- a/vortex-ffi/src/expression.rs +++ b/vortex-ffi/src/expression.rs @@ -286,11 +286,11 @@ pub unsafe extern "C" fn vx_expression_list_contains( #[cfg(test)] mod tests { - #![expect(deprecated)] use std::ptr; use std::sync::Arc; use vortex::array::IntoArray; + #[expect(deprecated)] use vortex::array::ToCanonical; use vortex::array::arrays::BoolArray; use vortex::array::arrays::ListArray; @@ -358,7 +358,9 @@ mod tests { { let applied_array = vx_array::as_ref(applied_array); let expected: Buffer = ages_array.to_buffer(); - assert_eq!(applied_array.to_primitive().to_buffer(), expected); + #[expect(deprecated)] + let prim = applied_array.to_primitive(); + assert_eq!(prim.to_buffer(), expected); } vx_array_free(applied_array); @@ -462,6 +464,7 @@ mod tests { assert!(error.is_null()); assert!(!applied_array.is_null()); { + #[expect(deprecated)] let array = vx_array::as_ref(applied_array).to_bool(); let expected = BoolArray::from_iter([false, false, true, false]); assert_eq!(array.to_bit_buffer(), expected.to_bit_buffer()); @@ -475,6 +478,7 @@ mod tests { assert!(error.is_null()); assert!(!applied_array.is_null()); { + #[expect(deprecated)] let array = vx_array::as_ref(applied_array).to_bool(); let expected = BoolArray::from_iter([true, true, true, false]); assert_eq!(array.to_bit_buffer(), expected.to_bit_buffer()); @@ -529,6 +533,7 @@ mod tests { assert!(error.is_null()); assert!(!applied.is_null()); { + #[expect(deprecated)] let applied = vx_array::as_ref(applied).to_bool(); let expected = BoolArray::from_iter([true, false, false]); assert_eq!(applied.to_bit_buffer(), expected.to_bit_buffer()); diff --git a/vortex-layout/src/layouts/struct_/reader.rs b/vortex-layout/src/layouts/struct_/reader.rs index ea6cfe1634b..6c39a8f1086 100644 --- a/vortex-layout/src/layouts/struct_/reader.rs +++ b/vortex-layout/src/layouts/struct_/reader.rs @@ -388,8 +388,6 @@ impl LayoutReader for StructReader { #[cfg(test)] mod tests { - #![expect(deprecated)] - use std::sync::Arc; use rstest::fixture; @@ -398,6 +396,7 @@ mod tests { use vortex_array::IntoArray; use vortex_array::LEGACY_SESSION; use vortex_array::MaskFuture; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::VortexSessionExecute; use vortex_array::arrays::BoolArray; @@ -692,14 +691,18 @@ mod tests { assert_eq!(result.len(), 2); let expected_a = PrimitiveArray::from_iter([7i32, 2]); + #[expect(deprecated)] + let result_struct_a = result.to_struct(); assert_arrays_eq!( - result.to_struct().unmasked_field_by_name("a").unwrap(), + result_struct_a.unmasked_field_by_name("a").unwrap(), expected_a ); let expected_b = PrimitiveArray::from_iter([4i32, 5]); + #[expect(deprecated)] + let result_struct_b = result.to_struct(); assert_arrays_eq!( - result.to_struct().unmasked_field_by_name("b").unwrap(), + result_struct_b.unmasked_field_by_name("b").unwrap(), expected_b ); } diff --git a/vortex-layout/src/layouts/zoned/zone_map.rs b/vortex-layout/src/layouts/zoned/zone_map.rs index c55554a7914..083dc5ca787 100644 --- a/vortex-layout/src/layouts/zoned/zone_map.rs +++ b/vortex-layout/src/layouts/zoned/zone_map.rs @@ -275,12 +275,11 @@ impl StatsAccumulator { #[cfg(test)] mod tests { - #![expect(deprecated)] - use std::sync::Arc; use rstest::rstest; use vortex_array::IntoArray; + #[expect(deprecated)] use vortex_array::ToCanonical; use vortex_array::arrays::BoolArray; use vortex_array::arrays::PrimitiveArray; @@ -342,20 +341,16 @@ mod tests { MIN_IS_TRUNCATED, ] ); + #[expect(deprecated)] + let field1_bool = stats_table.array.unmasked_field(1).to_bool(); assert_eq!( - stats_table - .array - .unmasked_field(1) - .to_bool() - .to_bit_buffer(), + field1_bool.to_bit_buffer(), BitBuffer::from(vec![false, true]) ); + #[expect(deprecated)] + let field3_bool = stats_table.array.unmasked_field(3).to_bool(); assert_eq!( - stats_table - .array - .unmasked_field(3) - .to_bool() - .to_bit_buffer(), + field3_bool.to_bit_buffer(), BitBuffer::from(vec![true, false]) ); } @@ -380,22 +375,12 @@ mod tests { Stat::Sum.name(), ] ); - assert_eq!( - stats_table - .array - .unmasked_field(1) - .to_bool() - .to_bit_buffer(), - BitBuffer::from(vec![false]) - ); - assert_eq!( - stats_table - .array - .unmasked_field(3) - .to_bool() - .to_bit_buffer(), - BitBuffer::from(vec![false]) - ); + #[expect(deprecated)] + let field1_bool = stats_table.array.unmasked_field(1).to_bool(); + assert_eq!(field1_bool.to_bit_buffer(), BitBuffer::from(vec![false])); + #[expect(deprecated)] + let field3_bool = stats_table.array.unmasked_field(3).to_bool(); + assert_eq!(field3_bool.to_bit_buffer(), BitBuffer::from(vec![false])); } #[rstest] From c8d98c81af5fbd2243cd28672d6264ead2899846 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 14:19:09 -0400 Subject: [PATCH 7/8] fix Signed-off-by: Joe Isaacs --- encodings/datetime-parts/src/compute/cast.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/encodings/datetime-parts/src/compute/cast.rs b/encodings/datetime-parts/src/compute/cast.rs index e654c022be1..573a0af48d7 100644 --- a/encodings/datetime-parts/src/compute/cast.rs +++ b/encodings/datetime-parts/src/compute/cast.rs @@ -36,8 +36,6 @@ mod tests { use rstest::rstest; use vortex_array::ArrayRef; use vortex_array::IntoArray; - #[expect(deprecated)] - use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::arrays::TemporalArray; use vortex_array::builtins::ArrayBuiltins; From 5dbef40cd7e670586c36355fa5d11a5672e0c061 Mon Sep 17 00:00:00 2001 From: Joe Isaacs Date: Thu, 16 Apr 2026 14:35:05 -0400 Subject: [PATCH 8/8] fix Signed-off-by: Joe Isaacs --- encodings/fastlanes/src/rle/compute/cast.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/encodings/fastlanes/src/rle/compute/cast.rs b/encodings/fastlanes/src/rle/compute/cast.rs index a276fdf5e63..fc63f293c3a 100644 --- a/encodings/fastlanes/src/rle/compute/cast.rs +++ b/encodings/fastlanes/src/rle/compute/cast.rs @@ -46,8 +46,6 @@ impl CastReduce for RLE { mod tests { use rstest::rstest; use vortex_array::IntoArray; - #[expect(deprecated)] - use vortex_array::ToCanonical; use vortex_array::arrays::PrimitiveArray; use vortex_array::assert_arrays_eq; use vortex_array::builtins::ArrayBuiltins;