diff --git a/arrow/benches/filter_kernels.rs b/arrow/benches/filter_kernels.rs index ae5eec386eb4..18b6e2a938b4 100644 --- a/arrow/benches/filter_kernels.rs +++ b/arrow/benches/filter_kernels.rs @@ -23,7 +23,7 @@ use arrow::util::bench_util::*; use arrow::array::*; use arrow::compute::filter; -use arrow::datatypes::{Field, Float32Type, Int32Type, Schema, UInt8Type}; +use arrow::datatypes::{Field, Float32Type, Int32Type, Int64Type, Schema, UInt8Type}; use arrow_array::types::Decimal128Type; use criterion::{criterion_group, criterion_main, Criterion}; @@ -283,6 +283,17 @@ fn add_benchmark(c: &mut Criterion) { "filter context mixed string view low selectivity (kept 1/1024)", |b| b.iter(|| bench_built_filter(&sparse_filter, &data_array)), ); + + let data_array = create_primitive_run_array::(size, size); + c.bench_function("filter run array (kept 1/2)", |b| { + b.iter(|| bench_built_filter(&filter, &data_array)) + }); + c.bench_function("filter run array high selectivity (kept 1023/1024)", |b| { + b.iter(|| bench_built_filter(&dense_filter, &data_array)) + }); + c.bench_function("filter run array low selectivity (kept 1/1024)", |b| { + b.iter(|| bench_built_filter(&sparse_filter, &data_array)) + }); } criterion_group!(benches, add_benchmark);