@@ -23,7 +23,8 @@ use arrow::array::ArrayRef;
2323use arrow:: datatypes:: { Int64Type , UInt64Type } ;
2424use arrow:: row:: { RowConverter , SortField } ;
2525use arrow:: util:: bench_util:: {
26- create_primitive_array, create_string_array_with_len, create_string_dict_array,
26+ create_dict_from_values, create_primitive_array, create_string_array_with_len,
27+ create_string_dict_array,
2728} ;
2829use arrow_array:: types:: Int32Type ;
2930use arrow_array:: Array ;
@@ -94,6 +95,21 @@ fn row_bench(c: &mut Criterion) {
9495 vec ! [ Arc :: new( create_string_dict_array:: <Int32Type >( 4096 , 0.5 , 100 ) ) as ArrayRef ] ;
9596 do_bench ( c, "4096 string_dictionary(100, 0.5)" , cols. clone ( ) ) ;
9697
98+ let values = create_string_array_with_len :: < i32 > ( 10 , 0. , 10 ) ;
99+ let dict = create_dict_from_values :: < Int32Type > ( 4096 , 0. , & values) ;
100+ let cols = vec ! [ Arc :: new( dict) as ArrayRef ] ;
101+ do_bench ( c, "4096 string_dictionary_low_cardinality(10, 0)" , cols) ;
102+
103+ let values = create_string_array_with_len :: < i32 > ( 10 , 0. , 30 ) ;
104+ let dict = create_dict_from_values :: < Int32Type > ( 4096 , 0. , & values) ;
105+ let cols = vec ! [ Arc :: new( dict) as ArrayRef ] ;
106+ do_bench ( c, "4096 string_dictionary_low_cardinality(30, 0)" , cols) ;
107+
108+ let values = create_string_array_with_len :: < i32 > ( 10 , 0. , 100 ) ;
109+ let dict = create_dict_from_values :: < Int32Type > ( 4096 , 0. , & values) ;
110+ let cols = vec ! [ Arc :: new( dict) as ArrayRef ] ;
111+ do_bench ( c, "4096 string_dictionary_low_cardinality(100, 0)" , cols) ;
112+
97113 let cols = vec ! [
98114 Arc :: new( create_string_array_with_len:: <i32 >( 4096 , 0.5 , 20 ) ) as ArrayRef ,
99115 Arc :: new( create_string_array_with_len:: <i32 >( 4096 , 0. , 30 ) ) as ArrayRef ,
0 commit comments