alamb commented on code in PR #9601:
URL: https://github.com/apache/arrow-datafusion/pull/9601#discussion_r1524587434
##########
datafusion/functions/benches/to_char.rs:
##########
@@ -42,8 +38,8 @@ fn random_date_in_range(
start_date + TimeDelta::try_days(random_days).unwrap()
}
-fn data(rng: &mut ThreadRng) -> Date32Array {
- let mut data: Vec<i32> = vec![];
+fn data(rng: &mut ThreadRng) -> Vec<Expr> {
Review Comment:
Right, but then the benchmark is simply testing how fast the `to_char`
expr_fn function is creating a `Expr::Function` call (but not actually
evaluting the expression)
```rust
data.iter().enumerate().for_each(|(idx, i)| {
black_box(to_char(i.clone(), patterns.get(idx).unwrap().clone()));
})
```
--
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]