You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2026/10/14 14:17:00 UTC

[I] gcd benchmarks pass number_rows: 0 for 100k-row inputs [datafusion]

andygrove opened a new issue, #26297:
URL: https://github.com/apache/datafusion/issues/26297

   ### Describe the bug
   
   All three benchmarks in [functions/benches/math_expressions/gcd.rs](https://github.com/apache/datafusion/blob/0d79252f61bd8777990b2749c216ffd07079c30d/datafusion/functions/benches/math_expressions/gcd.rs#L24-L105) pass `number_rows: 0` in `ScalarFunctionArgs`, including "gcd both array" and "gcd array and scalar", whose array inputs have 100,000 rows. The sibling `lcm.rs` benchmark passes `number_rows: n_rows`. A UDF that sizes its output or expands scalars from `number_rows` will not do the work the benchmark claims to measure.
   
   Every gcd benchmark also uses the copy-pasted message `.expect("date_bin should work on valid values")`.
   
   ### To Reproduce
   
   Read `gcd.rs` lines 56, 77 and 98 (`number_rows: 0`) and compare with `lcm.rs` line 55 (`number_rows: n_rows`).
   
   ### Expected behavior
   
   - Pass `number_rows: n_rows` for the benchmarks with array inputs (and `1` for scalar-scalar).
   - Change the expect messages to `"gcd should work on valid values"`.
   
   ### Additional context
   
   `to_char.rs` (L144-L341), `gcd.rs` and `lcm.rs` repeat the same `bench_function` + `ScalarFunctionArgs` boilerplate seven times, which is how this drift happened. A small shared helper that takes the UDF, args, `number_rows` and return type would prevent it. That part is optional.
   
   This is a small, self-contained change and a good first issue. Line references are pinned to commit 0d79252f61bd.
   


-- 
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-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] gcd benchmarks pass number_rows: 0 for 100k-row inputs [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #26297: gcd benchmarks pass number_rows: 0 for 100k-row inputs
URL: https://github.com/apache/datafusion/issues/26297


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] gcd benchmarks pass number_rows: 0 for 100k-row inputs [datafusion]

Posted by "med9110 (via GitHub)" <gi...@apache.org>.
med9110 commented on issue #26297:
URL: https://github.com/apache/datafusion/issues/26297#issuecomment-6171002466

   Hi @andygrove, I'd like to work on #26297. I'll keep the change focused on correcting number_rows and the error messages in the GCD benchmarks, then validate the benchmark target. Would that scope be appropriate?


-- 
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-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org