You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/07/23 14:22:01 UTC

[GitHub] [hudi] prashantwason commented on issue #1845: [SUPPORT] Support for Schema evolution. Facing an error

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