yihua opened a new pull request, #9237: URL: https://github.com/apache/hudi/pull/9237
### Change Logs This PR fixes the write failure for Avro enum type. When the input records have an enum field in the Avro schema, the write fails due to before this fix: ``` 29542 [Executor task launch worker for task 2.0 in stage 35.0 (TID 56)] ERROR org.apache.hudi.io.HoodieCreateHandle [] - Error writing record HoodieRecord{key=HoodieKey { recordKey=09959033-0742-4638-aca4-44162efa4b27 partitionPath=2015/03/17}, currentLocation='null', newLocation='null'} org.apache.avro.AvroRuntimeException: Unknown schema type: ENUM at org.apache.hudi.avro.HoodieAvroUtils.rewritePrimaryType(HoodieAvroUtils.java:948) ~[classes/:?] at org.apache.hudi.avro.HoodieAvroUtils.rewriteRecordWithNewSchemaInternal(HoodieAvroUtils.java:895) ~[classes/:?] at org.apache.hudi.avro.HoodieAvroUtils.rewriteRecordWithNewSchema(HoodieAvroUtils.java:830) ~[classes/:?] at org.apache.hudi.avro.HoodieAvroUtils.rewriteRecordWithNewSchemaInternal(HoodieAvroUtils.java:851) ~[classes/:?] at org.apache.hudi.avro.HoodieAvroUtils.rewriteRecordWithNewSchema(HoodieAvroUtils.java:830) ~[classes/:?] at org.apache.hudi.avro.HoodieAvroUtils.rewriteRecordWithNewSchema(HoodieAvroUtils.java:800) ~[classes/:?] at org.apache.hudi.avro.HoodieAvroUtils.rewriteRecordWithNewSchema(HoodieAvroUtils.java:784) ~[classes/:?] at org.apache.hudi.common.model.HoodieAvroRecord.prependMetaFields(HoodieAvroRecord.java:132) ~[classes/:?] at org.apache.hudi.io.HoodieCreateHandle.doWrite(HoodieCreateHandle.java:144) ~[classes/:?] at org.apache.hudi.io.HoodieWriteHandle.write(HoodieWriteHandle.java:182) ~[classes/:?] at org.apache.hudi.execution.CopyOnWriteInsertHandler.consume(CopyOnWriteInsertHandler.java:98) ~[classes/:?] ``` A new enum field is added to the trip schema in `HoodieTestDataGenerator`. ### Impact Fixes the core write functionality for Avro enum type. ### Risk level low ### Documentation Update N/A ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable - [ ] CI passed -- 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. To unsubscribe, e-mail: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org