Repository navigation
Minor enhancement to parse_str_with_list - #105
Merged
Merged
Conversation
A minor enhancement to `parse_str_with_list` to return the parsed named schemata. This is to make it easier to use with `to_avro_datum_schemata` and `from_avro_datum_schemata`, both of which take a root schema and a Vector of named schemas.
martin-g
approved these changes
Jan 18, 2025
martin-g
reviewed
Jan 18, 2025
| let (schema_c, schemata) = | ||
| Schema::parse_str_with_list(schema_str_c, &[schema_str_a, schema_str_b])?; | ||
|
|
||
| let schema_a_expected = Schema::Record(RecordSchema { |
Member
There was a problem hiding this comment.
I think it would be a good idea to start using a builder for the non-primitive schema types and RecordFiled. There are many fields which have good defaults which could be omitted here.
I'll file an issue!
Member
|
Thank you, @rayokota ! |
Contributor
Author
|
Thanks @martin-g for the quick response! |
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.
A minor enhancement to
parse_str_with_listto return the parsed named schemata. This is to make it easier to use withto_avro_datum_schemataandfrom_avro_datum_schemata, both of which take a root schema and a Vector of named schemas.This is a follow-on PR to #104