apache / apache/datafusion

Improve test coverage for spilling (memory-limited) sort/aggregation/sort-merge-join

Open
#13,431 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

Now DataFusion supports spilling for memory-limited sort/aggregation/sort-merge-join operators. In order to stabilize those features https://github.com/apache/datafusion/issues/13123, more tests should be added.

The high-level objectives are:

1. Memory limit stress tests for related operators: Run queries with large memory consumption (sorting a large relational table for example), and use minimal possible memory limit to let them run successfully
2. Add integration test to make sure physical memory usage respects to configured memory limits
3. Add fuzz tests to ensure the correctness of memory-limited queries (spilled and in-memory execution should return equivalent results)

### Describe the solution you'd like

_No response_

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked spilling-stability issue, #13123, and then locate the existing sort, aggregation, and sort-merge-join tests in the DataFusion repository. Done means adding stress, memory-limit, and fuzz or equivalence coverage so spilled and in-memory execution produce equivalent results and configured memory limits are respected.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.