Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor enhancement to parse_str_with_list #105

Merged
merged 2 commits into from
Jan 18, 2025

Conversation

rayokota
Copy link
Contributor

@rayokota rayokota commented Jan 18, 2025

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.

This is a follow-on PR to #104

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.
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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martin-g martin-g merged commit 4411f75 into apache:main Jan 18, 2025
13 checks passed
@martin-g
Copy link
Member

Thank you, @rayokota !

@rayokota
Copy link
Contributor Author

Thanks @martin-g for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants