Skip to content

Commit 25d2108

Browse files
authored
Fix merge_kernels benchmark panic due to not wrapping with Scalar (#10199)
as identified by - #9975 this benchmark was panicking when run, because it was passing a 1-len array as an `ArrayRef` instead of a `Scalar` and thus indexing the 2nd/3rd element was causing out of bounds panic; when wrapped in `Scalar` the single element will be repeated so it wouldn't index out of bounds it would just get the first element
1 parent 5555ee9 commit 25d2108

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arrow/benches/merge_kernels.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ fn bench_merge_on_input_generator(c: &mut Criterion, input_generator: &impl Inpu
188188
&mut group,
189189
&masks,
190190
&array_1_10pct_nulls,
191-
&non_null_scalar_1,
191+
&Scalar::new(non_null_scalar_1.clone()),
192192
);
193193

194194
bench_merge_input_on_all_masks(
195195
"non_null_scalar_vs_array",
196196
&mut group,
197197
&masks,
198-
&non_null_scalar_1,
198+
&Scalar::new(non_null_scalar_1.clone()),
199199
&array_1_10pct_nulls,
200200
);
201201

0 commit comments

Comments
 (0)