[
https://issues.apache.org/jira/browse/AVRO-2415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16865467#comment-16865467
]
ASF subversion and git services commented on AVRO-2415:
-------------------------------------------------------
Commit f6417e88b9973e932b8bad66fa6894d42c43c663 in avro's branch
refs/heads/master from Martin Jubelgas
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=f6417e8 ]
AVRO-2415 - Union resolver regression when dealing with arrays (#537)
> Regression: Schema evolution of union containing array fails in 1.9.0
> ---------------------------------------------------------------------
>
> Key: AVRO-2415
> URL: https://issues.apache.org/jira/browse/AVRO-2415
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.9.0
> Reporter: Martin Jubelgas
> Assignee: Martin Jubelgas
> Priority: Major
>
> I've come across another example that does not resolve in 1.9.0 but did in
> 1.8.2:
> {code:java}
> public void testArrayInUnion() throws Exception {
> Schema writerSchema = SchemaBuilder.array().items().intType();
> Schema readerSchema = SchemaBuilder.unionOf()
> .nullType()
> .and()
> .array().items().intType().endUnion();
> ResolvingDecoder.resolve(writerSchema, readerSchema );
> }
> {code}
> results in just the same kind of exception (even with pull request #526
> applied)
> {code:java}
> java.lang.ClassCastException: org.apache.avro.Resolver$ReaderUnion cannot be
> cast to org.apache.avro.Resolver$Container
> at
> org.apache.avro.io.parsing.ResolvingGrammarGenerator.generate(ResolvingGrammarGenerator.java:95)
> at
> org.apache.avro.io.parsing.ResolvingGrammarGenerator.generate(ResolvingGrammarGenerator.java:65)
> at org.apache.avro.io.ResolvingDecoder.resolve(ResolvingDecoder.java:85)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)