feat: Replace to_datum* functions with GenericDatumWriter#499
Open
Kriskras99 wants to merge 4 commits intomainfrom
Open
feat: Replace to_datum* functions with GenericDatumWriter#499Kriskras99 wants to merge 4 commits intomainfrom
to_datum* functions with GenericDatumWriter#499Kriskras99 wants to merge 4 commits intomainfrom
Conversation
martin-g
reviewed
Mar 4, 2026
| value: &T, | ||
| ) -> AvroResult<usize> { | ||
| let mut serializer = | ||
| SchemaAwareWriteSerializer::new(writer, self.schema, self.resolved.get_names(), None); |
Member
There was a problem hiding this comment.
At many places we pass None as enclosing namespace.
We should use the schema's namespace instead.
The issue is that their types are different: Namespace (Option<String>) vs. NamespaceRef (Option<&str>)
Contributor
Author
There was a problem hiding this comment.
I don't think that's right. In my mental model, the enclosing_namespace is the namespace of the parent schema of the schema currently being used.
Looking at the code for SchemaAwareWriteSerializer and Value::validate_internal this is exactly how it is used.
Contributor
Author
There was a problem hiding this comment.
I've added a fix for Value::validate_schemata that does not set the enclosing_namespace.
added 2 commits
March 4, 2026 09:41
`enclosing_namespace` is the namespace of the parent schema, but there is no parent schema and should therefore not be set.
422a0e8 to
f4f3fa5
Compare
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 is the sibling to #496