A memory-limited sort query fails
Open
bug
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Describe the bug
I discovered this bug when implementing a test module in https://github.com/apache/datafusion/pull/14142
Compile and run datafusion-cli
```
cargo run -- --mem-pool-type fair -m 80M -c 'select c1, c1 as c2 from generate_series(1,10000000) as t1(c1) order by c2 DESC, c1 ASC NULLS LAST'
```
The query failed with
```
Error: Resources exhausted: Failed to allocate additional 131072 bytes for ExternalSorterMerge[0] with 31850496 bytes already allocated for this reservation - 45560 bytes remain available for the total pool
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.