prashantwason commented on issue #1845:
URL: https://github.com/apache/hudi/issues/1845#issuecomment-663035816


   The  [javadoc for 
DatumWriter](https://avro.apache.org/docs/1.7.6/api/java/org/apache/avro/file/DataFileWriter.html#append(D)
   ) says: 
   
   "Stores in a file a sequence of data conforming to a schema. The schema is 
stored in the file with the data. Each datum in a file is of the same schema."
   
   Your test case has records with different schema being written to the same 
file. 
   
   Please try using the [GenericDatumReader 
construtor](https://avro.apache.org/docs/1.8.2/api/java/org/apache/avro/generic/GenericDatumReader.html#GenericDatumReader(org.apache.avro.Schema,%20org.apache.avro.Schema))
 which specifies both the reader/writer schema. 
   GenericDatumReader(Schema writer, Schema reader)
   


----------------------------------------------------------------
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