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-3649: Fix for union type to match default values for any innertype #2503

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

clesaec
Copy link
Contributor

@clesaec clesaec commented Sep 19, 2023

What is the purpose of the change

Change the logic on Union type to validate a value (default value in particular) for AVRO-3649. Instead of check value with first union inner type, try with inner type until find a match.

Verifying this change

Some test were updated.

Documentation

  • Does this pull request introduce a new feature? no

@clesaec clesaec requested a review from opwvhk September 19, 2023 09:50
@github-actions github-actions bot added Java Pull Requests for Java binding website labels Sep 19, 2023
@@ -421,6 +426,53 @@ void qualifiedName() {
assertEquals("Int", nameInt.getQualified("space"));
}

@Test
void validValue() {
Copy link
Contributor

@opwvhk opwvhk Sep 19, 2023

Choose a reason for hiding this comment

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

Do we want the name to explicitly mention we're testing default values here?
(a matter of style/opinion only)

Copy link
Contributor

@opwvhk opwvhk left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

2 participants