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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.9.1
    • java
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: