apache / apache/datafusion-comet

Bound memory when a partition has many files

Open
#5,343 0 comments 0 reactions 1 assignee Claimed by @parthchandra View on GitHub
area:scan enhancement
Dominant language
Scala
Stars
1.3k
Forks
373
Avg merge
2d 4h
Merged PRs (30d)
198

Description

### What is the problem the feature request solves?

Follow up for #5323

The merge opens every file in the partition at once, and each open file allocates an Arrow read buffer. Partitions with a very large number of files can run out of memory on large datasets.

### Describe the potential solution

read a fixed number of files at a time instead of all of them, and order which files to read first by some stats (or another signal), while still producing correct merged order.

### 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.