Describe the bug
The array execution path for repeat(string, count) can panic on a large count because it multiplies string length by count before checking for overflow.
To Reproduce
SELECT repeat(x, 9223372036854775807)
FROM (VALUES ('abc')) AS t(x);
Actual behavior
thread 'main' panicked at datafusion/functions/src/string/repeat.rs:237:41:
attempt to multiply with overflow
Expected behavior
Return a string-size overflow error, as the scalar path already does, rather than panicking.
Notes
This reproducer uses a one-row input column so it reaches the array path without trying to allocate the full result.
Describe the bug
The array execution path for
repeat(string, count)can panic on a large count because it multiplies string length by count before checking for overflow.To Reproduce
Actual behavior
Expected behavior
Return a string-size overflow error, as the scalar path already does, rather than panicking.
Notes
This reproducer uses a one-row input column so it reaches the array path without trying to allocate the full result.