martin-g commented on code in PR #19888:
URL: https://github.com/apache/datafusion/pull/19888#discussion_r2707989245


##########
datafusion/functions/benches/cot.rs:
##########
@@ -85,6 +86,51 @@ fn criterion_benchmark(c: &mut Criterion) {
                 )
             })
         });
+
+        // Scalar benchmarks
+        let scalar_f32_args =
+            vec![ColumnarValue::Scalar(ScalarValue::Float32(Some(1.0)))];
+        let scalar_f32_arg_fields =
+            vec![Field::new("a", DataType::Float32, false).into()];
+        let return_field_f32 = Field::new("f", DataType::Float32, 
false).into();
+
+        c.bench_function(&format!("cot f32 scalar: {size}"), |b| {
+            b.iter(|| {
+                black_box(
+                    cot_fn
+                        .invoke_with_args(ScalarFunctionArgs {
+                            args: scalar_f32_args.clone(),
+                            arg_fields: scalar_f32_arg_fields.clone(),
+                            number_rows: 1,

Review Comment:
   In that case there is no need the Scalar bench to be inside `for size in 
[1024, 4096, 8192] {`. Currently it executes the very same logic with the very 
same config three times (once for each size).



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to