Add support for named Avro schema references when translating Avro schemas to Arrow schemas - #14
Merged
Merged
Conversation
…hemas to Arrow schemas
Tyler-Sch
approved these changes
Sep 13, 2026
Tyler-Sch
left a comment
Owner
There was a problem hiding this comment.
Thanks for the PR.
Overall this looks pretty good and I can merge it after it builds.
A few things to note:
- the PR makes schema refs work on deserialize only. A round trip with serialize would fail
- The repo has a fast path (decodes straight into Arrow builders, fast_decode.rs / fast_encode.rs) and a slow path (goes through apache_avro::types::Value). Schemas with refs will always take the slow path since is_supported doesn't recognize Schema::Ref.
Otherwise, things look good. Thanks for the contribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support named Avro schema references
Summary
Add support for named Avro schema references when translating Avro schemas to Arrow schemas.
Problem
Valid Avro schemas can define a named record once and reuse it in later fields. The Avro parser represents these uses as
Schema::Ref, which previously reached an unimplemented branch and caused a panic during deserialization.Changes
Testing
cargo test --workspaceAll workspace tests and documentation tests pass.
Risk
Low. The change only affects schemas containing named references; existing schema translations continue through their original paths.
Breaking Changes
None.