apache / apache/datafusion

A memory-limited sort query fails

Open
#14,143 1 comment 4 reactions 1 assignee Claimed by @2010YOUY01 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.