Copilot commented on code in PR #15928: URL: https://github.com/apache/datafusion/pull/15928#discussion_r2153125391
########## datafusion/functions/benches/regx.rs: ########## @@ -127,6 +128,46 @@ fn criterion_benchmark(c: &mut Criterion) { }) }); + c.bench_function("regexp_instr_1000 string", |b| { + let mut rng = rand::thread_rng(); + let data = Arc::new(data(&mut rng)) as ArrayRef; + let regex = Arc::new(regex(&mut rng)) as ArrayRef; + let start = Arc::new(start(&mut rng)) as ArrayRef; + let flags = Arc::new(flags(&mut rng)) as ArrayRef; + + b.iter(|| { + black_box( + regexp_instr_func(&[ + Arc::clone(&data), + Arc::clone(®ex), + Arc::clone(&start), Review Comment: The benchmark passes `flags` as the fourth argument, but according to the UDF signature it should be the fifth. Add the missing `n` (occurrence) argument or adjust the argument order. ```suggestion Arc::clone(&start), Arc::new(n(&mut rng)) as ArrayRef, ``` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org