This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-11722-adf530d92015d502256cbd7562a445936958450a in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
commit ae774abe6142f2282770251c9cbb13749f1c0add Author: RIchard Baah <[email protected]> AuthorDate: Tue Oct 20 20:37:04 2026 +0000 bench(arrow): cover Boolean, Dictionary, and REE coalescing (#11722) Closes #11721. Adds single-column Dictionary and REE cases to the existing coalesce filter, take, and interleave benchmarks. Boolean is already covered. Stacked on #11519; leaving this as a draft until that merges. --- arrow/benches/coalesce_kernels.rs | 86 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/arrow/benches/coalesce_kernels.rs b/arrow/benches/coalesce_kernels.rs index da62fa390c..d43001a514 100644 --- a/arrow/benches/coalesce_kernels.rs +++ b/arrow/benches/coalesce_kernels.rs @@ -18,6 +18,7 @@ //! Benchmarks for the `coalesce` kernels in Arrow. use arrow::util::bench_util::*; +use arrow::util::data_gen::create_random_array; use std::sync::Arc; use arrow::array::*; @@ -105,6 +106,29 @@ fn add_all_filter_benchmarks(c: &mut Criterion) { // TODO model other dictionary types here (FixedSizeBinary for example) ])); + let single_dictionary_schema = SchemaRef::new(Schema::new(vec![Field::new( + "value", + DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8)), + true, + )])); + + let single_run_end_schema = SchemaRef::new(Schema::new(vec![Field::new( + "value", + DataType::RunEndEncoded( + Arc::new(Field::new( + Field::REE_RUN_ENDS_FIELD_DEFAULT_NAME, + DataType::Int32, + false, + )), + Arc::new(Field::new( + Field::REE_VALUES_FIELD_DEFAULT_NAME, + DataType::Int32, + true, + )), + ), + true, + )])); + let single_fsb16_schema = SchemaRef::new(Schema::new(vec![Field::new( "value", DataType::FixedSizeBinary(16), @@ -320,6 +344,18 @@ fn add_all_filter_benchmarks(c: &mut Criterion) { } .build(); + FilterBenchmarkBuilder { + c, + name: "single_dict", + batch_size, + num_output_batches: 25, + null_density, + selectivity, + max_string_len: 30, + schema: &single_dictionary_schema, + } + .build(); + FilterBenchmarkBuilder { c, name: "single_fsb16", @@ -356,6 +392,18 @@ fn add_all_filter_benchmarks(c: &mut Criterion) { } .build(); + FilterBenchmarkBuilder { + c, + name: "single_ree", + batch_size, + num_output_batches: 25, + null_density, + selectivity, + max_string_len: 0, + schema: &single_run_end_schema, + } + .build(); + FilterBenchmarkBuilder { c, name: "single_fsl4", @@ -470,6 +518,29 @@ fn add_all_gather_benchmarks(c: &mut Criterion, operation: GatherOperation) { Field::new("float_val2", DataType::Float64, true), ])); + let single_dictionary_schema = SchemaRef::new(Schema::new(vec![Field::new( + "value", + DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8)), + true, + )])); + + let single_run_end_schema = SchemaRef::new(Schema::new(vec![Field::new( + "value", + DataType::RunEndEncoded( + Arc::new(Field::new( + Field::REE_RUN_ENDS_FIELD_DEFAULT_NAME, + DataType::Int32, + false, + )), + Arc::new(Field::new( + Field::REE_VALUES_FIELD_DEFAULT_NAME, + DataType::Int32, + true, + )), + ), + true, + )])); + let single_fsb16_schema = SchemaRef::new(Schema::new(vec