Skip to content
New issue

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

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

Already on GitHub? # to your account

Invalid Union index (17); union only has 2 types #164

Open
iNikem opened this issue May 22, 2019 · 4 comments
Open

Invalid Union index (17); union only has 2 types #164

iNikem opened this issue May 22, 2019 · 4 comments
Labels

Comments

@iNikem
Copy link

iNikem commented May 22, 2019

I believe this is a different issue from #123.

Please see the project attached. Running ./gradlew run demonstrates the failure.

We have a binary avro file serialised by Jackson. We have a writer schema in a separate file, which describes the class which was serialised. Next we have a reader schema with one of the fields from that class removed. In my actual project we have removed some fields from the class and updated a schema to be able to deserialised older data while ignoring removed fields. Unfortunately removing some fields from reader schema fails deserialisation.

The correct behaviour, as far as I understand it, should be to ignore fields which are not present in the reader schema.

avro.zip

@cowtowncoder
Copy link
Member

Sounds like a bug, thank you for reporting this. I hope to look into it relatively soon (there's bit of a backlog).

cowtowncoder added a commit that referenced this issue Jun 6, 2019
@cowtowncoder
Copy link
Member

I can reproduce this problem, added failing unit test. I suspect this is due to a problem in updating state after "missing" long field is skipped (or, likely, is not and should be skipped).

@wincentzzz
Copy link

Hello, any updates for this issue?

@cowtowncoder
Copy link
Member

@wincentzzz No. The usual practice is to add a note on issue if there are updates.

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

No branches or pull requests

3 participants