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] Fix MapWriteContext not correctly resolving union values #136

Merged
merged 1 commit into from
May 23, 2018

Conversation

baharclerode
Copy link
Contributor

We recently discovered a bug with the Avro serializer where using a map whose values are a union of multiple record schemas fails because the MapWriteContext does not pass each item to createChildObjectContext(), so Jackson can't resolve which schema in the union should be used.

I've added a test that demonstrates the issue and the associated fix in MapWriteContext.

It looks like this issue was fixed upstream as a part of the refactoring in 8b9171c for 3.0, but we'd like to utilize this in 2.9.

@cowtowncoder
Copy link
Member

Thank you for the fix! Sounds good, and based on earlier work I assume this to be valid.
But I will try to go over this just to make sure I understand it. Should make it in 2.9.6.

@cowtowncoder cowtowncoder merged commit e03fa92 into FasterXML:2.9 May 23, 2018
@baharclerode baharclerode deleted the bah.AvroUnionMapValues branch May 24, 2018 18:43
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.

None yet

2 participants