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 (Assertion 
https://github.com/sbernauer/avro-schema-evolution-test/blob/42e634bdcca9c996007566557c647c2785191e94/src/test/java/main/AvroSchemaEvolutionTest.java#L75).
   We can also check the generated avro file. So i assume, I'm currently not 
able to reproduce the error.
   ```
    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"}
   ```
   
   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]


Reply via email to