apache / apache/datafusion

Avoid concatenating record batches in joins to alleviate memory pressure

Open
#23,031 6 comments 5 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?

Many of the joins (such as HashJoin) concatenate input record batches into a single record batch for ease of index accounting, but this causes huge memory pressure issues when the datasets are large.

### Describe the solution you'd like

If the joins were able to preserve the original record batches without concatenation, this would help alleviate OOMs on large queries.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing join implementations such as HashJoin and locating where input record batches are concatenated for index accounting. Review how joins could preserve original batches, then validate that large joins avoid the reported memory pressure while retaining correct results.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.