Skip to content

Commit 9e14703

Browse files
committed
merge
Signed-off-by: Nicholas Gates <nick@nickgates.com>
2 parents 546e397 + f43e12b commit 9e14703

740 files changed

Lines changed: 24472 additions & 21027 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ jobs:
395395
name: "Rust tests (${{ matrix.sanitizer }})"
396396
runs-on: >-
397397
${{ github.repository == 'vortex-data/vortex'
398-
&& format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=rust-test-sanitizer', github.run_id)
398+
&& format('runs-on={0}/pool=amd64-medium-pre-v2/tag=rust-test-sanitizer', github.run_id)
399399
|| 'ubuntu-latest' }}
400400
timeout-minutes: 40
401401
env:
@@ -699,7 +699,7 @@ jobs:
699699
name: "Java"
700700
runs-on: >-
701701
${{ github.repository == 'vortex-data/vortex'
702-
&& format('runs-on={0}/runner=amd64-medium/image=ubuntu24-full-x64-pre-v2/tag=java', github.run_id)
702+
&& format('runs-on={0}/pool=amd64-medium-pre-v2/tag=java', github.run_id)
703703
|| 'ubuntu-latest' }}
704704
timeout-minutes: 40
705705
steps:

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmarks/compress-bench/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn chunked_to_vec_record_batch(
2323
// TODO(connor)[ListView]: The rust Parquet implementation does not support writing
2424
// `ListView` to Parquet files yet.
2525
let converted_array = recursive_list_from_list_view(array.clone())?;
26-
Ok(RecordBatch::try_from(converted_array.as_ref())?)
26+
Ok(RecordBatch::try_from(&converted_array)?)
2727
})
2828
.collect::<anyhow::Result<Vec<_>>>()?;
2929

benchmarks/compress-bench/src/vortex.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use async_trait::async_trait;
1212
use bytes::Bytes;
1313
use futures::StreamExt;
1414
use futures::pin_mut;
15+
use vortex::array::IntoArray;
1516
use vortex::file::OpenOptionsSessionExt;
1617
use vortex::file::WriteOptionsSessionExt;
1718
use vortex_bench::Format;
@@ -37,7 +38,7 @@ impl Compressor for VortexCompressor {
3738
let mut cursor = Cursor::new(&mut buf);
3839
SESSION
3940
.write_options()
40-
.write(&mut cursor, uncompressed.to_array_stream())
41+
.write(&mut cursor, uncompressed.into_array().to_array_stream())
4142
.await?;
4243
let elapsed = start.elapsed();
4344

@@ -51,7 +52,7 @@ impl Compressor for VortexCompressor {
5152
let mut cursor = Cursor::new(&mut buf);
5253
SESSION
5354
.write_options()
54-
.write(&mut cursor, uncompressed.to_array_stream())
55+
.write(&mut cursor, uncompressed.into_array().to_array_stream())
5556
.await?;
5657

5758
// Now decompress

docs/api/c/dtypes.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ Struct Fields
7878
.. c:autotype:: vx_struct_fields
7979
:file: vortex.h
8080

81-
.. c:autofunction:: vx_struct_fields_clone
82-
:file: vortex.h
83-
8481
.. c:autofunction:: vx_struct_fields_free
8582
:file: vortex.h
8683

encodings/alp/benches/alp_compress.rs

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,47 @@ fn decompress_alp<T: ALPFloat + NativePType>(bencher: Bencher, args: (usize, f64
103103
.bench_values(|(v, mut ctx)| decompress_into_array(v, &mut ctx));
104104
}
105105

106-
#[divan::bench(types = [f32, f64], args = [10_000, 100_000])]
107-
fn compress_rd<T: ALPRDFloat>(bencher: Bencher, n: usize) {
108-
let primitive = PrimitiveArray::new(buffer![T::from(1.23).unwrap(); n], Validity::NonNullable);
109-
let encoder = RDEncoder::new(&[T::from(1.23).unwrap()]);
106+
const RD_BENCH_ARGS: &[(usize, f64)] = &[
107+
// length, fraction_patch
108+
(10_000, 0.0),
109+
(10_000, 0.01),
110+
(10_000, 0.1),
111+
(100_000, 0.0),
112+
(100_000, 0.01),
113+
(100_000, 0.1),
114+
];
115+
116+
fn make_rd_array<T: ALPRDFloat + NativePType>(n: usize, fraction_patch: f64) -> PrimitiveArray {
117+
let base_val = T::from(1.23).unwrap();
118+
let mut rng = StdRng::seed_from_u64(42);
119+
let mut values = buffer![base_val; n].into_mut();
120+
if fraction_patch > 0.0 {
121+
let outlier = T::from(1000.0).unwrap();
122+
for index in 0..values.len() {
123+
if rng.random_bool(fraction_patch) {
124+
values[index] = outlier;
125+
}
126+
}
127+
}
128+
PrimitiveArray::new(values.freeze(), Validity::NonNullable)
129+
}
130+
131+
#[divan::bench(types = [f32, f64], args = RD_BENCH_ARGS)]
132+
fn compress_rd<T: ALPRDFloat + NativePType>(bencher: Bencher, args: (usize, f64)) {
133+
let (n, fraction_patch) = args;
134+
let primitive = make_rd_array::<T>(n, fraction_patch);
135+
let encoder = RDEncoder::new(primitive.as_slice::<T>());
110136

111137
bencher
112138
.with_inputs(|| (&primitive, &encoder))
113139
.bench_refs(|(primitive, encoder)| encoder.encode(primitive))
114140
}
115141

116-
#[divan::bench(types = [f32, f64], args = [10_000, 100_000])]
117-
fn decompress_rd<T: ALPRDFloat>(bencher: Bencher, n: usize) {
118-
let primitive = PrimitiveArray::new(buffer![T::from(1.23).unwrap(); n], Validity::NonNullable);
119-
let encoder = RDEncoder::new(&[T::from(1.23).unwrap()]);
142+
#[divan::bench(types = [f32, f64], args = RD_BENCH_ARGS)]
143+
fn decompress_rd<T: ALPRDFloat + NativePType>(bencher: Bencher, args: (usize, f64)) {
144+
let (n, fraction_patch) = args;
145+
let primitive = make_rd_array::<T>(n, fraction_patch);
146+
let encoder = RDEncoder::new(primitive.as_slice::<T>());
120147
let encoded = encoder.encode(&primitive);
121148

122149
bencher

0 commit comments

Comments
 (0)