Repository navigation
feat: Duration inner fixed schema and serialization - #382
Merged
Merged
Conversation
Kriskras99
reviewed
Dec 29, 2025
Kriskras99
left a comment
Contributor
There was a problem hiding this comment.
First glance looks good, I'll have a more in depth look tomorrow
Contributor
Author
|
@Kriskras99 thanks for the feedback, I made the suggested changes |
martin-g
reviewed
Dec 30, 2025
Contributor
Author
|
@martin-g thanks for all the feedback! I should have taken a closer look at the Schema enum and schema comparison functions. I made fixes and added some tests to address all but one of your comments, and on the one remaining one, I responded and would be interested in your thoughts. |
Kriskras99
reviewed
Jan 5, 2026
Kriskras99
reviewed
Jan 5, 2026
martin-g
reviewed
Jan 6, 2026
martin-g
approved these changes
Jan 7, 2026
Contributor
|
Thanks for your contribution @jdarais! |
KitFieldhouse
added a commit
to KitFieldhouse/avro-rs
that referenced
this pull request
Jan 14, 2026
… resolved schema variants
Closed
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.
This PR adds some missing functionality for the Duration type:
This PR also deprecates
SchemaKind::is_namedin favor of a newSchema::is_namedfunction, which can correctly determine whether a schema is for a named type, even when it is for a logical type that could have either a named or non-named underlying type, (such as "decimal" or "uuid".)One note on this change: I noticed that the derive macro for AvroSchema was using the Duration schema for core::time::Duration. It is no longer trivial to create a schema for a Duration type, since the schema would need to be given a name. It looks like other named types are excluded from these derive macros, so I just deleted the
impl_schema!(core::time::Duration, Schema::Duration)line, but I'm not sure if there's something better that can be done here.