jecsand838 opened a new pull request, #7834: URL: https://github.com/apache/arrow-rs/pull/7834
# Which issue does this PR close? Part of https://github.com/apache/arrow-rs/issues/4886 # Rationale for this change This PR refactors the Avro reader's public API to provide a more ergonomic and idiomatic experience. The previous implementation exposed low-level primitives like and , requiring users to manually orchestrate the process of reading, decompressing, and decoding Avro data. `read_header``read_blocks` The new API abstracts this complexity behind a high-level and a fluent , making it significantly easier to use and more consistent with other readers in the ecosystem. `Reader``ReaderBuilder``arrow-rs` # What changes are included in this PR? The core of this PR is the API redesign, replacing the manual, function-based approach with a more robust, struct-based one. - **`Reader<R: BufRead>`**: The main addition is a high-level struct that implements the standard and traits. This encapsulates the entire reading process, allowing users to simply iterate over the reader to get es. `Reader``Iterator``RecordBatchReader``RecordBatch` - **`ReaderBuilder`**: The former struct has been replaced with a . This provides a fluent interface for configuring and constructing a . It simplifies the setup for options like , , and enabling support. `ReadOptions``ReaderBuilder``Reader``batch_size``strict_mode``Utf8View` - **Streaming `Decoder`**: For more advanced, asynchronous use cases, a has been introduced. It's designed to be used in streaming contexts where Avro data arrives in chunks. The can also be used to construct an instance of this . `Decoder``ReaderBuilder``Decoder` - **API Encapsulation**: The low-level functions and are no longer part of the public API. Their logic is now an internal implementation detail of the new . `read_header``read_blocks``Reader` # Are these changes tested? Yes. The existing tests, such as and , have been refactored to use the new and APIs. This migration validates the new abstractions and demonstrates their simplicity compared to the previous, more verbose test setup. Additionally, new tests have been added to cover the streaming 's functionality, ensuring it works correctly. `test_alltypes``test_utf8view_support``ReaderBuilder``Reader``Decoder` # Are there any user-facing changes? N/A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org