[
https://issues.apache.org/jira/browse/AVRO-2736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17869499#comment-17869499
]
Gerrit Birkeland commented on AVRO-2736:
----------------------------------------
For ease of reproduction, I stripped down the schema to a smaller sample set
and created https://github.com/Gerrit0/repros/tree/AVRO-2736 -- this is
specifically a problem with the JSON decoder. The binary decoder works as
expected.
> Avro-cpp schema resolution fails on complex union type
> ------------------------------------------------------
>
> Key: AVRO-2736
> URL: https://issues.apache.org/jira/browse/AVRO-2736
> Project: Apache Avro
> Issue Type: Bug
> Components: c++
> Affects Versions: 1.9.1
> Environment: ubuntu 18.04
> Reporter: Michiel Mertens
> Priority: Major
> Attachments: ControllerLog.avro.json
>
>
> When using the attached JSON schema, we can encode/decode without problems.
> When i promote BurstInfo:demodId from int to long, decoding fails on old
> files.
> I get the following exception
> {noformat}
> Invalid operation. Schema requires: Union, got: Record
> {noformat}
> It seems that the resolving decoder is resolving correctly, but the exception
> is throw during parsing at accessing the root of the tree.
> I dont think the actual content of the file matters, but I did not tests that.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)