wombatu-kun opened a new pull request, #18187: URL: https://github.com/apache/hudi/pull/18187
### Describe the issue this Pull Request addresses When we create table by Flink with disabled meta-fields and Key generator not set, Hoodie stores hoodie.properties with `hoodie.populate.meta.fields=false` and `hoodie.table.keygenerator.class=org.apache.hudi.keygen.ComplexAvroKeyGenerator`. And then, when we try to insert any data in this table by Spark we get exception like this: `org.apache.hudi.exception.HoodieException: Only simple, non-partitioned or complex key generator are supported when meta-fields are disabled. Used: org.apache.hudi.keygen.ComplexAvroKeyGenerator` But Spark can convert hoodie-common KeyGenerators to SparkKeyGeneratorInterface implementations and it actually do this. ### Summary and Changelog Hoodie-common `SimpleAvroKeyGenerator`, `NonpartitionedAvroKeyGenerator` and `ComplexAvroKeyGenerator` are considered as valid Key Generators too, when populating meta-fields are disabled. ### Impact Now Spark can insert data into tables that were created with (`hoodie.populate.meta.fields=false`) and (SimpleAvro-, NonpartitionedAvro- or ComplexAvro-) key generator set in hoodie.properties. ### Risk Level none ### Documentation Update none ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Enough context is provided in the sections above - [ ] Adequate tests were added if applicable -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
