Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2415

Regression: Schema evolution of union containing array fails in 1.9.0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.10.0, 1.9.1
    • Component/s: java
    • Labels:
      None

      Description

      I've come across another example that does not resolve in 1.9.0 but did in 1.8.2:

        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 );
        }
      

      results in just the same kind of exception (even with pull request #526 applied)

      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)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                unchuckable Martin Jubelgas
                Reporter:
                unchuckable Martin Jubelgas
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: