apache / apache/datafusion-comet
Bound memory when a partition has many files
Open
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
Assessment
This issue has not been assessed yet.