danny0405 commented on code in PR #20484:
URL: https://github.com/apache/hudi/pull/20484#discussion_r4438701113
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##########
@@ -376,9 +376,12 @@ private static void setupHoodieKeyOptions(Configuration
conf, CatalogTable table
if (partitions.length == 1) {
final String partitionField = partitions[0];
if (partitionField.isEmpty()) {
- conf.set(FlinkOptions.KEYGEN_CLASS_NAME,
NonpartitionedAvroKeyGenerator.class.getName());
- log.info("Table option [{}] is reset to {} because this is a
non-partitioned table",
- FlinkOptions.KEYGEN_CLASS_NAME.key(),
NonpartitionedAvroKeyGenerator.class.getName());
+ // Do not override an explicitly configured key generator on
non-partitioned tables
+ if
(StringUtils.isNullOrEmpty(conf.get(FlinkOptions.KEYGEN_CLASS_NAME))) {
Review Comment:
the custom key generator does not really work for flink ingestion path, the
whole key gen logic situated in `RowDataKeyGen`.
--
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]