Skip to content

Commit

Permalink
chore: benchmark both scenarios, with records skipped and without ski…
Browse files Browse the repository at this point in the history
…pped, for the delta-bin-packed primitive arrays (#6489)
  • Loading branch information
wiedld authored Oct 5, 2024
1 parent c039762 commit af10781
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions parquet/benches/arrow_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,23 @@ fn bench_primitive<T>(
assert_eq!(count, EXPECTED_VALUE_COUNT);
});

// binary packed, half NULLs
let data = build_encoded_primitive_page_iterator::<T>(
optional_column_desc.clone(),
0.5,
Encoding::DELTA_BINARY_PACKED,
min,
max,
);
group.bench_function("binary packed, optional, half NULLs", |b| {
b.iter(|| {
let array_reader =
create_primitive_array_reader(data.clone(), optional_column_desc.clone());
count = bench_array_reader(array_reader);
});
assert_eq!(count, EXPECTED_VALUE_COUNT);
});

// binary packed skip , no NULLs
let data = build_encoded_primitive_page_iterator::<T>(
mandatory_column_desc.clone(),
Expand Down Expand Up @@ -1041,19 +1058,19 @@ fn bench_primitive<T>(
assert_eq!(count, EXPECTED_VALUE_COUNT);
});

// binary packed, half NULLs
// binary packed skip, half NULLs
let data = build_encoded_primitive_page_iterator::<T>(
optional_column_desc.clone(),
0.5,
Encoding::DELTA_BINARY_PACKED,
min,
max,
);
group.bench_function("binary packed, optional, half NULLs", |b| {
group.bench_function("binary packed skip, optional, half NULLs", |b| {
b.iter(|| {
let array_reader =
create_primitive_array_reader(data.clone(), optional_column_desc.clone());
count = bench_array_reader(array_reader);
count = bench_array_reader_skip(array_reader);
});
assert_eq!(count, EXPECTED_VALUE_COUNT);
});
Expand Down

0 comments on commit af10781

Please sign in to comment.