Dandandan opened a new issue, #22217:
URL: https://github.com/apache/datafusion/issues/22217
### 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
```sql
SELECT repeat(x, 9223372036854775807)
FROM (VALUES ('abc')) AS t(x);
```
### Actual behavior
```text
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.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]