sbernauer edited a comment on issue #1845:
URL: https://github.com/apache/hudi/issues/1845#issuecomment-663065111


   Yes, to be correct you have to specify both reader and writer schema to 
GenericDatumReader. Hudi currenty only passes one schema here 
https://github.com/apache/hudi/blob/c3279cd5989805946267b046007ea23ba4b615c2/hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java#L107
 and here 
https://github.com/apache/hudi/blob/c3279cd5989805946267b046007ea23ba4b615c2/hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java#L117
   I think that's a problem
   
   I would have used GenericDatumReader with reader and writer schema, but 
first I wanted to append new evoluted events to an existing file. Looking at 
"Each datum in a file is of the same schema"  this seems expected behavior to 
be impossible.
   
   "Each datum in a file is of the same schema" - How is the strategy of Hudi 
when there are Upserts for an evoluted event? The new events can't simply be 
written to an existing file.
   Every time a file must be updated, read it correctly with the **reader and 
writer** schema and than create a new file with the new schema?


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to