panic: array_repeat list path overflows inner element count multiplication
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in datafusion/functions-nested/src/repeat.rs at the calculation around line 245, then run the SQL reproduction with the large repeat count. Check the existing array_repeat execution-error handling and add coverage for list-length multiplication overflow. Done means the query returns an execution error for output-size overflow instead of panicking.
Written by the indexing model from the issue text.
Description
Describe the bug
array_repeat can panic for list inputs when len * count overflows while calculating the repeated inner value count.
To Reproduce
SELECT array_repeat([1,2,3], 9223372036854775807);
Actual behavior
thread 'main' panicked at datafusion/functions-nested/src/repeat.rs:245:32:
attempt to multiply with overflow
Expected behavior
Return an execution error for an output-size overflow instead of panicking.
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 354
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/datafusion
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
apache/datafusion#25266 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/datafusion#25213 · 1 comment ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/datafusion#25168 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
apache/datafusion#24998 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/datafusion#24913 ·
All issues in apache/datafusion
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·