apache / apache/datafusion

Track peak memory usage in `SortExec`

Open
#16,042 2 comments 1 reaction 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?

Profiling the peak memory usage of blocking operators can be helpful.Aggregation and SortMergeJoin has already implemented it: https://github.com/apache/datafusion/blob/7a3d020af2a3736db11ba7477efc1a5dae96c2d3/datafusion/physical-plan/src/aggregates/row_hash.rs#L113

### Describe the solution you'd like

Track peak memory usage in `SortExec`

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the SortExec implementation in DataFusion's physical-plan code, then compare its memory handling with the referenced datafusion/physical-plan/src/aggregates/row_hash.rs implementation. Confirm how existing operator memory metrics are tested and update the relevant SortExec tests so they demonstrate that peak memory usage is tracked.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.