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
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.
Activity
fix: guard repeat array length overflow (apache#22293)