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

AVRO-3851: [Rust] Validate default value for record fields and enums on parsing #2481

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

sarutak
Copy link
Member

@sarutak sarutak commented Sep 4, 2023

AVRO-3851

What is the purpose of the change

This PR proposes to improve the functionality of parsing default values for record fields and enums.

Currently, default values for record fields are validated on parsing only if their types are union.
It's nice to apply such validation for other types.
Similarly, default values for enum are not also validated on parsing now.

So this PR changes parser functionality to validate default values for record fields and enums.

Verifying this change

Added new tests.

Documentation

  • Does this pull request introduce a new feature? (no)

@sarutak sarutak changed the title AVRO-3851: [Rust] Validate default value for record fields and enum on parsing AVRO-3851: [Rust] Validate default value for record fields and enums on parsing Sep 4, 2023
@github-actions github-actions bot added the Rust label Sep 4, 2023
@martin-g martin-g merged commit 2244da0 into apache:master Sep 7, 2023
martin-g pushed a commit that referenced this pull request Sep 7, 2023
…on parsing (#2481)

(cherry picked from commit 2244da0)
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@martin-g
Copy link
Member

martin-g commented Sep 7, 2023

Thank you, @sarutak !
Great work !

RanbirK pushed a commit to RanbirK/avro that referenced this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants