Omega359 commented on code in PR #9601:
URL: https://github.com/apache/arrow-datafusion/pull/9601#discussion_r1523886133


##########
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:
   The benchmark functions iterate on the data and patterns so that shouldn't 
be the case. 
   ```
           let data = data(&mut rng);
           let patterns = patterns(&mut rng);
   
           b.iter(|| {
               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]

Reply via email to