From 2419404c77e4b833d4ef405d2de6b03e94972820 Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Mon, 13 Jul 2026 16:47:43 +0300 Subject: [PATCH 1/2] remove all sort benches --- datafusion/core/benches/sort.rs | 93 +-------------------------------- 1 file changed, 2 insertions(+), 91 deletions(-) diff --git a/datafusion/core/benches/sort.rs b/datafusion/core/benches/sort.rs index 4c4cb2ea1ec92..81751f4a36f4d 100644 --- a/datafusion/core/benches/sort.rs +++ b/datafusion/core/benches/sort.rs @@ -157,96 +157,7 @@ type PartitionedBatches = Vec>; type StreamGenerator = Box PartitionedBatches>; fn criterion_benchmark(c: &mut Criterion) { - for &(input_size, size_label) in INPUT_SIZES { - let cases: Vec<(&str, StreamGenerator)> = vec![ - ( - "i64", - Box::new(move |sorted| i64_streams(sorted, input_size)), - ), - ( - "f64", - Box::new(move |sorted| f64_streams(sorted, input_size)), - ), - ( - "utf8 low cardinality", - Box::new(move |sorted| utf8_low_cardinality_streams(sorted, input_size)), - ), - ( - "utf8 high cardinality", - Box::new(move |sorted| utf8_high_cardinality_streams(sorted, input_size)), - ), - ( - "utf8 view low cardinality", - Box::new(move |sorted| { - utf8_view_low_cardinality_streams(sorted, input_size) - }), - ), - ( - "utf8 view high cardinality", - Box::new(move |sorted| { - utf8_view_high_cardinality_streams(sorted, input_size) - }), - ), - ( - "utf8 tuple", - Box::new(move |sorted| utf8_tuple_streams(sorted, input_size)), - ), - ( - "utf8 view tuple", - Box::new(move |sorted| utf8_view_tuple_streams(sorted, input_size)), - ), - ( - "utf8 dictionary", - Box::new(move |sorted| dictionary_streams(sorted, input_size)), - ), - ( - "utf8 dictionary tuple", - Box::new(move |sorted| dictionary_tuple_streams(sorted, input_size)), - ), - ( - "mixed dictionary tuple", - Box::new(move |sorted| { - mixed_dictionary_tuple_streams(sorted, input_size) - }), - ), - ( - "mixed tuple", - Box::new(move |sorted| mixed_tuple_streams(sorted, input_size)), - ), - ( - "mixed tuple with utf8 view", - Box::new(move |sorted| { - mixed_tuple_with_utf8_view_streams(sorted, input_size) - }), - ), - ]; - - for (name, f) in &cases { - c.bench_function(&format!("merge sorted {name} {size_label}"), |b| { - let data = f(true); - let case = BenchCase::merge_sorted(&data); - b.iter(move || case.run()) - }); - - c.bench_function(&format!("sort merge {name} {size_label}"), |b| { - let data = f(false); - let case = BenchCase::sort_merge(&data); - b.iter(move || case.run()) - }); - - c.bench_function(&format!("sort {name} {size_label}"), |b| { - let data = f(false); - let case = BenchCase::sort(&data); - b.iter(move || case.run()) - }); - - c.bench_function(&format!("sort partitioned {name} {size_label}"), |b| { - let data = f(false); - let case = BenchCase::sort_partitioned(&data); - b.iter(move || case.run()) - }); - } - } + // s.be } /// Encapsulates running each test case @@ -989,5 +900,5 @@ fn with_extra_columns(batches: PartitionedBatches, n: usize) -> PartitionedBatch .collect() } -criterion_group!(benches, criterion_benchmark, sort_axis_benchmark); +criterion_group!(benches, criterion_benchmark); criterion_main!(benches); From 5b1aa71e7c8d57f1da954c8ecf8016afafa4be69 Mon Sep 17 00:00:00 2001 From: Raz Luvaton <16746759+rluvaton@users.noreply.github.com> Date: Mon, 13 Jul 2026 22:40:41 +0300 Subject: [PATCH 2/2] try --- datafusion/core/benches/sort.rs | 91 ++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/datafusion/core/benches/sort.rs b/datafusion/core/benches/sort.rs index 81751f4a36f4d..181d1b564b34e 100644 --- a/datafusion/core/benches/sort.rs +++ b/datafusion/core/benches/sort.rs @@ -157,7 +157,96 @@ type PartitionedBatches = Vec>; type StreamGenerator = Box PartitionedBatches>; fn criterion_benchmark(c: &mut Criterion) { - // s.be + for &(input_size, size_label) in INPUT_SIZES { + let cases: Vec<(&str, StreamGenerator)> = vec![ + ( + "i64", + Box::new(move |sorted| i64_streams(sorted, input_size)), + ), + // ( + // "f64", + // Box::new(move |sorted| f64_streams(sorted, input_size)), + // ), + // ( + // "utf8 low cardinality", + // Box::new(move |sorted| utf8_low_cardinality_streams(sorted, input_size)), + // ), + // ( + // "utf8 high cardinality", + // Box::new(move |sorted| utf8_high_cardinality_streams(sorted, input_size)), + // ), + // ( + // "utf8 view low cardinality", + // Box::new(move |sorted| { + // utf8_view_low_cardinality_streams(sorted, input_size) + // }), + // ), + // ( + // "utf8 view high cardinality", + // Box::new(move |sorted| { + // utf8_view_high_cardinality_streams(sorted, input_size) + // }), + // ), + // ( + // "utf8 tuple", + // Box::new(move |sorted| utf8_tuple_streams(sorted, input_size)), + // ), + // ( + // "utf8 view tuple", + // Box::new(move |sorted| utf8_view_tuple_streams(sorted, input_size)), + // ), + // ( + // "utf8 dictionary", + // Box::new(move |sorted| dictionary_streams(sorted, input_size)), + // ), + // ( + // "utf8 dictionary tuple", + // Box::new(move |sorted| dictionary_tuple_streams(sorted, input_size)), + // ), + // ( + // "mixed dictionary tuple", + // Box::new(move |sorted| { + // mixed_dictionary_tuple_streams(sorted, input_size) + // }), + // ), + // ( + // "mixed tuple", + // Box::new(move |sorted| mixed_tuple_streams(sorted, input_size)), + // ), + // ( + // "mixed tuple with utf8 view", + // Box::new(move |sorted| { + // mixed_tuple_with_utf8_view_streams(sorted, input_size) + // }), + // ), + ]; + + for (name, f) in &cases { + c.bench_function(&format!("merge sorted {name} {size_label}"), |b| { + let data = f(true); + let case = BenchCase::merge_sorted(&data); + b.iter(move || case.run()) + }); + + c.bench_function(&format!("sort merge {name} {size_label}"), |b| { + let data = f(false); + let case = BenchCase::sort_merge(&data); + b.iter(move || case.run()) + }); + + c.bench_function(&format!("sort {name} {size_label}"), |b| { + let data = f(false); + let case = BenchCase::sort(&data); + b.iter(move || case.run()) + }); + + c.bench_function(&format!("sort partitioned {name} {size_label}"), |b| { + let data = f(false); + let case = BenchCase::sort_partitioned(&data); + b.iter(move || case.run()) + }); + } + } } /// Encapsulates running each test case