wuwenchi commented on code in PR #6320:
URL: https://github.com/apache/hudi/pull/6320#discussion_r941159266


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/StreamerUtil.java:
##########
@@ -315,7 +316,8 @@ public static HoodieTableMetaClient initTableIfNotExists(
           .setPreCombineField(OptionsResolver.getPreCombineField(conf))
           .setArchiveLogFolder(ARCHIVELOG_FOLDER.defaultValue())
           
.setPartitionFields(conf.getString(FlinkOptions.PARTITION_PATH_FIELD, null))
-          
.setKeyGeneratorClassProp(conf.getString(FlinkOptions.KEYGEN_CLASS_NAME))
+          .setKeyGeneratorClassProp(
+              
conf.getOptional(FlinkOptions.KEYGEN_CLASS_NAME).orElse(SimpleAvroKeyGenerator.class.getName()))
           
.setHiveStylePartitioningEnable(conf.getBoolean(FlinkOptions.HIVE_STYLE_PARTITIONING))

Review Comment:
   Thanks for reminding, I add the test with `getKeyGeneratorClassName`.



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

Reply via email to