apache / apache/arrow-rs

Async avro reader OOM with large files

Open
#9,668 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.6k
Forks
1.3k
Avg merge
2d 14h
Merged PRs (30d)
167

Description

Note we have also been trying to separate the IO from the decoding in Parquet -- see https://docs.rs/parquet/58.0.0/parquet/arrow/push_decoder/struct.ParquetPushDecoder.html

Perhaps we could move Avro to that model too rather than implementing the async stuff first

_Originally posted by @alamb in https://github.com/apache/arrow-rs/issues/9632#issuecomment-4194635214_

Issue:
The async avro reader reads all the data upfront, even though the avro file format is serial, thus decoding and data fetching could happen in parallel (like datafusion's json scan, for example).

One potential solution: use an async stream, as presented in https://github.com/apache/arrow-rs/pull/9632

Contributor guide

Open the contributing guide

Research direction

Start by comparing the async Avro reader with the ParquetPushDecoder model linked in the issue, then review DataFusion's JSON scan and pull request 9632 for streaming precedents. Done means large Avro files no longer require reading all data upfront, while fetching and decoding can proceed in parallel without an out-of-memory failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.