Skip to content

Commit 8df0d7f

Browse files
committed
deprecate all decompression methods without a context
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 8b09d0c commit 8df0d7f

90 files changed

Lines changed: 305 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

vortex-array/benches/take_patches.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use rand::rngs::StdRng;
1111
use vortex_array::ArrayRef;
1212
use vortex_array::IntoArray;
1313
use vortex_array::LEGACY_SESSION;
14+
#[allow(deprecated)]
1415
use vortex_array::ToCanonical;
1516
use vortex_array::VortexSessionExecute;
1617
use vortex_array::patches::Patches;
@@ -37,6 +38,7 @@ const BENCH_ARGS: &[(f64, f64)] = &[
3738
];
3839

3940
#[divan::bench(args = BENCH_ARGS)]
41+
#[expect(deprecated)]
4042
fn take_search(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) {
4143
let mut rng = StdRng::seed_from_u64(0);
4244
let patches = fixture(65536, patches_sparsity, &mut rng);
@@ -54,6 +56,7 @@ fn take_search(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64))
5456
}
5557

5658
#[divan::bench(args = BENCH_ARGS)]
59+
#[expect(deprecated)]
5760
fn take_search_chunked(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) {
5861
let mut rng = StdRng::seed_from_u64(0);
5962
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
7174
}
7275

7376
#[divan::bench(args = BENCH_ARGS)]
77+
#[expect(deprecated)]
7478
fn take_map(bencher: Bencher, (patches_sparsity, index_multiple): (f64, f64)) {
7579
let mut rng = StdRng::seed_from_u64(0);
7680
let patches = fixture(65536, patches_sparsity, &mut rng);

vortex-array/benches/varbinview_compact.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use rand::SeedableRng;
77
use rand::rngs::StdRng;
88
use vortex_array::ArrayRef;
99
use vortex_array::IntoArray;
10+
#[allow(deprecated)]
1011
use vortex_array::ToCanonical;
1112
use vortex_array::arrays::VarBinViewArray;
1213
use vortex_array::builders::VarBinViewBuilder;
@@ -37,6 +38,7 @@ fn compact_sliced(bencher: Bencher, args: (usize, usize)) {
3738
compact_sliced_impl(bencher, args);
3839
}
3940

41+
#[expect(deprecated)]
4042
fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)) {
4143
let base_size = (output_size * 100) / utilization_pct;
4244
let base_array = build_varbinview_fixture(base_size);
@@ -54,6 +56,7 @@ fn compact_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)
5456
})
5557
}
5658

59+
#[expect(deprecated)]
5760
fn compact_sliced_impl(bencher: Bencher, (output_size, utilization_pct): (usize, usize)) {
5861
let base_size = (output_size * 100) / utilization_pct;
5962
let base_array = build_varbinview_fixture(base_size);

vortex-array/src/array/erased.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,14 @@ impl ArrayRef {
301301
}
302302

303303
/// Returns the canonical representation of the array.
304+
#[deprecated(note = "use `array.execute::<Canonical>(ctx)` instead")]
304305
pub fn into_canonical(self) -> VortexResult<Canonical> {
305306
self.execute(&mut LEGACY_SESSION.create_execution_ctx())
306307
}
307308

308309
/// Returns the canonical representation of the array.
310+
#[deprecated(note = "use `array.execute::<Canonical>(ctx)` instead")]
311+
#[expect(deprecated)]
309312
pub fn to_canonical(&self) -> VortexResult<Canonical> {
310313
self.clone().into_canonical()
311314
}

vortex-array/src/array/typed.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ impl<V: VTable> Array<V> {
394394
}
395395

396396
#[deprecated(note = "Use Array::<V>::execute::<Canonical>() instead")]
397+
#[expect(deprecated)]
397398
pub fn to_canonical(&self) -> VortexResult<crate::Canonical> {
398399
self.inner.to_canonical()
399400
}

vortex-array/src/arrays/arbitrary.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use vortex_error::VortexExpect;
1313

1414
use crate::ArrayRef;
1515
use crate::IntoArray;
16+
#[allow(deprecated)]
1617
use crate::ToCanonical;
1718
use crate::arrays::BoolArray;
1819
use crate::arrays::ChunkedArray;
@@ -83,6 +84,7 @@ fn random_array(u: &mut Unstructured, dtype: &DType, len: Option<usize>) -> Resu
8384
}
8485

8586
/// Creates a random array chunk.
87+
#[expect(deprecated)]
8688
fn random_array_chunk(
8789
u: &mut Unstructured<'_>,
8890
dtype: &DType,

vortex-array/src/arrays/bool/compute/fill_null.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ impl FillNullKernel for Bool {
4242
}
4343

4444
#[cfg(test)]
45+
#[allow(deprecated)]
4546
mod tests {
4647
use rstest::rstest;
4748
use vortex_buffer::BitBuffer;

vortex-array/src/arrays/bool/compute/take.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ mod test {
8484
use vortex_buffer::buffer;
8585

8686
use crate::IntoArray as _;
87+
#[allow(deprecated)]
8788
use crate::ToCanonical;
8889
use crate::arrays::BoolArray;
8990
use crate::arrays::PrimitiveArray;
@@ -93,6 +94,7 @@ mod test {
9394
use crate::validity::Validity;
9495

9596
#[test]
97+
#[expect(deprecated)]
9698
fn take_nullable() {
9799
let reference = BoolArray::from_iter(vec![
98100
Some(false),

vortex-array/src/arrays/bool/vtable/operations.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ mod tests {
2828
use std::iter;
2929

3030
use crate::IntoArray;
31+
#[allow(deprecated)]
3132
use crate::ToCanonical;
3233
use crate::arrays::BoolArray;
3334
use crate::arrays::bool::BoolArrayExt;
3435
use crate::assert_arrays_eq;
3536

3637
#[test]
38+
#[expect(deprecated)]
3739
fn test_slice_hundred_elements() {
3840
let arr = BoolArray::from_iter(iter::repeat_n(Some(true), 100));
3941
let sliced_arr = arr.into_array().slice(8..16).unwrap().to_bool();
@@ -43,6 +45,7 @@ mod tests {
4345
}
4446

4547
#[test]
48+
#[expect(deprecated)]
4649
fn test_slice() {
4750
let arr = BoolArray::from_iter([Some(true), Some(true), None, Some(false), None]);
4851
let sliced_arr = arr.into_array().slice(1..4).unwrap().to_bool();

vortex-array/src/arrays/chunked/array.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ impl Array<Chunked> {
179179
})
180180
}
181181

182+
#[expect(deprecated)]
182183
pub fn rechunk(&self, target_bytesize: u64, target_rowsize: usize) -> VortexResult<Self> {
183184
let mut new_chunks = Vec::new();
184185
let mut chunks_to_combine = Vec::new();

vortex-array/src/arrays/chunked/compute/take.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ mod test {
126126
use vortex_error::VortexResult;
127127

128128
use crate::IntoArray;
129+
#[allow(deprecated)]
129130
use crate::ToCanonical;
130131
use crate::arrays::BoolArray;
131132
use crate::arrays::ChunkedArray;
@@ -254,6 +255,7 @@ mod test {
254255
}
255256

256257
#[test]
258+
#[expect(deprecated)]
257259
fn test_take_shuffled_large() -> VortexResult<()> {
258260
let nchunks: i32 = 100;
259261
let chunk_len: i32 = 1_000;

0 commit comments

Comments
 (0)