Schema refs on fast path - #16
Merged
Merged
Conversation
… add_val! macro was wrong for >1 type idents; IntervalUnit::DayTime mapped to intervalmonth; EnumArrayContainer::next_item panicked on null entries
# Conflicts: # ruhvro/src/complex.rs # ruhvro/src/serialization_containers.rs
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Address the schema dependency-ordering, deprecated documentation example, and GIL-handling findings.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds named Avro schema-reference support across fast encode/decode paths, schema resolution, and Python schema-to-Arrow conversion.
Changes:
- Adds multi-document schema parsing and reference resolution.
- Updates serialization and deserialization to use resolved schemas.
- Adds Python schema APIs, map metadata fixes, tests, and documentation.
| File | Summary |
|---|---|
src/lib.rs |
Adds Python schema APIs; moderate concern about holding the GIL during schema translation. |
ruhvro/src/serialize.rs |
Uses resolved schemas during serialization. |
ruhvro/src/serialization_containers.rs |
Separates original and resolved schemas. |
ruhvro/src/schema/translate.rs |
Updates schema translation and map metadata. |
ruhvro/src/schema/resolve.rs |
Adds named-reference resolution. |
ruhvro/src/schema/mod.rs |
Adds schema-list parsing; moderate concern about dependency ordering. |
ruhvro/src/lib.rs |
Updates public schema exports and examples. |
ruhvro/src/fast_encode.rs |
Integrates the updated schema translation. |
ruhvro/src/fast_decode.rs |
Integrates the schema module for decoding. |
ruhvro/src/deserialize.rs |
Resolves references during fast decoding. |
ruhvro/README.md |
Documents schema lists; nits concern dependency ordering and deprecated API usage. |
README.md |
Documents schema references; nit concerning dependency-ordering guidance. |
CLAUDE.md |
Updates repository architecture guidance. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+90
to
95
| #[pyfunction] | ||
| fn avro_to_arrow_schema(schema: SchemaArg) -> PyResult<PyArrowType<ArrowSchema>> { | ||
| let parsed_schema = get_or_parse_schema(&schema)?; | ||
| let arrow_schema = ruhvro::schema::to_arrow_schema(&parsed_schema).map_err(to_py_err)?; | ||
| Ok(PyArrowType(arrow_schema)) | ||
| } |
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.

Adds schema references on fast path