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/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 2455aab1f1 fix: date_trunc bench broken by #15049 (#15169)
2455aab1f1 is described below
commit 2455aab1f149cc51afd4dddde479af605c44c72f
Author: Arttu <[email protected]>
AuthorDate: Tue Mar 11 23:57:17 2025 +0000
fix: date_trunc bench broken by #15049 (#15169)
Closes https://github.com/apache/datafusion/issues/15167
---
datafusion/functions/benches/date_trunc.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/datafusion/functions/benches/date_trunc.rs
b/datafusion/functions/benches/date_trunc.rs
index b7efe7cc8d..e7e96fb7a9 100644
--- a/datafusion/functions/benches/date_trunc.rs
+++ b/datafusion/functions/benches/date_trunc.rs
@@ -46,11 +46,14 @@ fn criterion_benchmark(c: &mut Criterion) {
ColumnarValue::Scalar(ScalarValue::Utf8(Some("minute".to_string())));
let timestamps = ColumnarValue::Array(timestamps_array);
let udf = date_trunc();
- let return_type = &udf.return_type(&[timestamps.data_type()]).unwrap();
+ let args = vec![precision, timestamps];
+ let return_type = &udf
+ .return_type(&args.iter().map(|arg|
arg.data_type()).collect::<Vec<_>>())
+ .unwrap();
b.iter(|| {
black_box(
udf.invoke_with_args(ScalarFunctionArgs {
- args: vec![precision.clone(), timestamps.clone()],
+ args: args.clone(),
number_rows: batch_len,
return_type,
})
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]