apache / apache/datafusion

[Parquet] Pre-fetch the next row group when reading parquet files

Open
#18,470 3 comments 3 reactions 1 assignee Claimed by @alamb 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?

The current Parquet reader has the following pattern:
1. Do I/O to buffer data needed for row groups
2. Decode the data (make RecordBatches)
3. fetching IO for next row group
4. ...

The issue is that this means that after the row group is finished, the CPU will then have to wait for IO before it can begin decoding the next row group. We could use the CPUs more efficiently if we overlapped IO and CPU more

### Describe the solution you'd like

Prefetch the next row group (to start the IO) while actively reading the current group

### Describe alternatives you've considered

I made a POC of this approach and it looks promising (improves performance locally for very short queries)
- https://github.com/apache/datafusion/pull/18391

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