[ https://issues.apache.org/jira/browse/AVRO-2152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting resolved AVRO-2152. -------------------------------- Resolution: Invalid I'll resolve this as invalid then. Thanks! > JsonDecoder fails when reading record with aliases inside union > --------------------------------------------------------------- > > Key: AVRO-2152 > URL: https://issues.apache.org/jira/browse/AVRO-2152 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.8.2 > Environment: JDK 1.8 > Avro 1.8.2 > Reporter: Patrick Haas > Priority: Trivial > Attachments: JsonDecoderAliasesInUnion.java > > > The JsonDecoder only handles aliases at the "top level" or "field level". > Aliased records within a union fail with an "Unknown union branch" > AvroTypeException. > The same writer/read schema combination works fine with the binaryEncoder, > and the two schemas are considered a COMPATIBLE by the SchemaCompatibility > check. > > h1. Writer Schema > { > "type" : "record", > "name" : "WWrapper", > "namespace" : "writer.ns", > "doc" : "writer", > "fields" : [ { > "name" : "item", > "type" : [ "null", { > "type" : "record", > "name" : "WItem", > "doc" : "writer item", > "fields" : [ { > "name" : "value", > "type" : "string", > "doc" : "value" > } ] > } ], > "doc" : "value" > } ] > } > h1. Reader Schema > { > "type" : "record", > "name" : "RWrapper", > "namespace" : "reader.ns", > "doc" : "reader", > "fields" : [ { > "name" : "item", > "type" : [ "null", { > "type" : "record", > "name" : "RItem", > "doc" : "reader item", > "fields" : [ { > "name" : "value", > "type" : "string", > "doc" : "value" > } ], > "aliases" : [ "writer.ns.WItem" ] > } ], > "doc" : "value" > } ], > "aliases" : [ "writer.ns.WWrapper" ] > } -- This message was sent by Atlassian JIRA (v7.6.3#76005)