sbernauer opened a new issue #1806: URL: https://github.com/apache/hudi/issues/1806
Hello together, we try to ingest Avro-Events from Kafka to an MOR table on S3. The Deltasteamer cannot validate our events, but they seem totally valid to me. This is the error message: ``` org.apache.hudi.exception.SchemaCompatabilityException: Unable to validate the rewritten record {"eventId": "test-eventId-prefix-tsw", "happenedTimestamp": 6131449785280582000, "optionalField": null} against schema {"type":"record","name":"TestEvent","namespace":"com.mycompany","fields":[{"name":"_hoodie_commit_time","type":["null","string"],"doc":""},{"name":"_hoodie_commit_seqno","type":["null","string"],"doc":""},{"name":"_hoodie_record_key","type":["null","string"],"doc":""},{"name":"_hoodie_partition_path","type":["null","string"],"doc":""},{"name":"_hoodie_file_name","type":["null","string"],"doc":""},{"name":"eventId","type":{"type":"string","avro.java.string":"String"}},{"name":"happenedTimestamp","type":{"type":"long","java-class":"java.time.Instant"}},{"name":"optionalField","type":["null",{"type":"long","java-class":"java.time.Instant"}],"default":null}]} at org.apache.hudi.common.util.HoodieAvroUtils.rewrite(HoodieAvroUtils.java:229) at org.apache.hudi.common.util.HoodieAvroUtils.rewriteRecord(HoodieAvroUtils.java:208) at org.apache.hudi.io.HoodieWriteHandle.rewriteRecord(HoodieWriteHandle.java:160) at org.apache.hudi.io.HoodieCreateHandle.write(HoodieCreateHandle.java:103) at org.apache.hudi.io.HoodieWriteHandle.write(HoodieWriteHandle.java:152) at org.apache.hudi.execution.CopyOnWriteLazyInsertIterable$CopyOnWriteInsertHandler.consumeOneRecord(CopyOnWriteLazyInsertIterable.java:145) at org.apache.hudi.execution.CopyOnWriteLazyInsertIterable$CopyOnWriteInsertHandler.consumeOneRecord(CopyOnWriteLazyInsertIterable.java:128) at org.apache.hudi.common.util.queue.BoundedInMemoryQueueConsumer.consume(BoundedInMemoryQueueConsumer.java:37) at org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.lambda$null$2(BoundedInMemoryExecutor.java:121) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) ``` Im using hudi 0.5.3 on Spark 3.0.0 and avro 1.8.2 (I needed to patch this commit into it: https://github.com/apache/avro/commit/d9338a4cf008b445ea3efbe2523288d07162ec71). Is the default value of null a problem? Thanks a lot in advance! Sebastian The specific event (pretty printed): ``` { "eventId": "test-eventId-prefix-tsw", "happenedTimestamp": 6131449785280582000, "optionalField": null } ``` The avro-schema (pretty printed): ``` { "type": "record", "name": "TestEvent", "namespace": "com.mycompany", "fields": [ { "name": "eventId", "type": { "type": "string", "avro.java.string": "String" } }, { "name": "happenedTimestamp", "type": { "type": "long", "java-class": "java.time.Instant" } }, { "name": "optionalField", "type": [ "null", { "type": "long", "java-class": "java.time.Instant" } ], "default": null } ], "version": "1.0.0" } ``` ---------------------------------------------------------------- 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