This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 25d2108975 Fix `merge_kernels` benchmark panic due to not wrapping
with `Scalar` (#10199)
25d2108975 is described below
commit 25d2108975fcce4b3395a4f7d7d3fbaca8c80e46
Author: Jeffrey Vo <[email protected]>
AuthorDate: Wed Jun 24 04:45:26 2026 +0900
Fix `merge_kernels` benchmark panic due to not wrapping with `Scalar`
(#10199)
as identified by
- https://github.com/apache/arrow-rs/pull/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
---
arrow/benches/merge_kernels.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arrow/benches/merge_kernels.rs b/arrow/benches/merge_kernels.rs
index f7a7fe1f8f..20a00981ac 100644
--- a/arrow/benches/merge_kernels.rs
+++ b/arrow/benches/merge_kernels.rs
@@ -188,14 +188,14 @@ fn bench_merge_on_input_generator(c: &mut Criterion,
input_generator: &impl Inpu
&mut group,
&masks,
&array_1_10pct_nulls,
- &non_null_scalar_1,
+ &Scalar::new(non_null_scalar_1.clone()),
);
bench_merge_input_on_all_masks(
"non_null_scalar_vs_array",
&mut group,
&masks,
- &non_null_scalar_1,
+ &Scalar::new(non_null_scalar_1.clone()),
&array_1_10pct_nulls,
);