From 74c46ae51d22f5805d8e18c33d2374e284bcff05 Mon Sep 17 00:00:00 2001 From: Eduard Karacharov Date: Sun, 9 Jun 2024 11:34:33 +0300 Subject: [PATCH] row format benches for bool & nullable int --- arrow/benches/row_format.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arrow/benches/row_format.rs b/arrow/benches/row_format.rs index cb7455939e0b..b5298cbe3679 100644 --- a/arrow/benches/row_format.rs +++ b/arrow/benches/row_format.rs @@ -23,8 +23,8 @@ use arrow::array::ArrayRef; use arrow::datatypes::{Int64Type, UInt64Type}; use arrow::row::{RowConverter, SortField}; use arrow::util::bench_util::{ - create_dict_from_values, create_primitive_array, create_string_array_with_len, - create_string_dict_array, + create_boolean_array, create_dict_from_values, create_primitive_array, + create_string_array_with_len, create_string_dict_array, }; use arrow_array::types::Int32Type; use arrow_array::Array; @@ -60,9 +60,21 @@ fn row_bench(c: &mut Criterion) { let cols = vec![Arc::new(create_primitive_array::(4096, 0.)) as ArrayRef]; do_bench(c, "4096 u64(0)", cols); + let cols = vec![Arc::new(create_primitive_array::(4096, 0.3)) as ArrayRef]; + do_bench(c, "4096 u64(0.3)", cols); + let cols = vec![Arc::new(create_primitive_array::(4096, 0.)) as ArrayRef]; do_bench(c, "4096 i64(0)", cols); + let cols = vec![Arc::new(create_primitive_array::(4096, 0.3)) as ArrayRef]; + do_bench(c, "4096 i64(0.3)", cols); + + let cols = vec![Arc::new(create_boolean_array(4096, 0., 0.5)) as ArrayRef]; + do_bench(c, "4096 bool(0, 0.5)", cols); + + let cols = vec![Arc::new(create_boolean_array(4096, 0.3, 0.5)) as ArrayRef]; + do_bench(c, "4096 bool(0.3, 0.5)", cols); + let cols = vec![Arc::new(create_string_array_with_len::(4096, 0., 10)) as ArrayRef]; do_bench(c, "4096 string(10, 0)", cols);