Skip to content

A memory-limited sort query fails #14143

@2010YOUY01

Description

@2010YOUY01

Describe the bug

I discovered this bug when implementing a test module in #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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions