sbernauer edited a comment on issue #1845: URL: https://github.com/apache/hudi/issues/1845#issuecomment-662921730
Hi @bvaradar, I've created a test using pure avro DataFileWriter to reproduce my DeltaStreamer-test and it kind of works. You can find it here https://github.com/sbernauer/avro-schema-evolution-test/blob/master/src/test/java/main/AvroSchemaEvolutionTest.java There is no exception, but the evoluted optional field is missing. We can also check the generated avro file. ``` java -jar avro-tools-1.8.2.jar tojson output.avro {"timestamp":0.0,"rider":"myRider0","driver":"myDriver0"} {"timestamp":1.0,"rider":"myRider1","driver":"myDriver1"} {"timestamp":2.0,"rider":"myRider2","driver":"myDriver2"} ``` The second test 1.) Write record of B using schema B 2.) Write record of A using schema B It fails with ArrayIndexOutOfBoundsException. I found another post https://stackoverflow.com/questions/34733604/avro-schema-doesnt-honor-backward-compatibilty, it provides a testcase for schema evolution using a BinaryDecoder and reproduces the EOF exception. The mailing list entry http://apache-avro.679487.n3.nabble.com/AVRO-schema-evolution-adding-optional-column-with-default-fails-deserialization-td4043025.html describes the same problem but causes the ArrayIndexOutOfBoundsException. My setup is using avro 1.8.2. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
