alamb commented on code in PR #8988:
URL: https://github.com/apache/arrow-rs/pull/8988#discussion_r2617185655
##########
arrow/benches/zip_kernels.rs:
##########
@@ -224,6 +251,61 @@ fn bench_zip_input_on_all_masks(
}
}
+fn bench_zip_on_input_generator_for_scalars(
+ c: &mut Criterion,
+ input_generator: &impl InputGenerator,
+) {
+ bench_zip_on_input_generators_for_scalars(c, input_generator,
input_generator);
+}
+
+fn bench_zip_on_input_generators_for_scalars(
+ c: &mut Criterion,
+ input_generator_1: &impl InputGenerator,
+ input_generator_2: &impl InputGenerator,
+) {
+ let mut group = c.benchmark_group(
+ format!(
+ "zip_{ARRAY_LEN}_from_{} and {}",
+ input_generator_1.name(),
+ input_generator_2.name()
+ )
+ .as_str(),
+ );
+
+ let null_scalar = input_generator_1.generate_scalar_with_null_value();
+
+ let [non_null_scalar_1]: [_; 1] = input_generator_1
Review Comment:
I don't understand this code:
1. It seems to be making an array (not a scalar)
2. `generate_non_null_scalars` returns a vector but then the callsite only
ever seems to use a single return value -- why not just return a single array?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]