You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gcd benchmarks pass number_rows: 0 for 100k-row inputs #26297
All three benchmarks in functions/benches/math_expressions/gcd.rs 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 0d79252.
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?
Activity
med9110 commentedon Oct 14, 2026
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?
fix(functions): pass correct number_rows in gcd benchmarks (apache#26465