xicm commented on code in PR #6899:
URL: https://github.com/apache/hudi/pull/6899#discussion_r999297155
##########
hudi-sync/hudi-sync-common/src/main/java/org/apache/hudi/sync/common/HoodieSyncConfig.java:
##########
@@ -96,8 +96,13 @@ public class HoodieSyncConfig extends HoodieConfig {
.key("hoodie.datasource.hive_sync.partition_extractor_class")
.defaultValue("org.apache.hudi.hive.MultiPartKeysValueExtractor")
.withInferFunction(cfg -> {
- Option<String> partitionFieldsOpt =
Option.ofNullable(cfg.getString(HoodieTableConfig.PARTITION_FIELDS))
- .or(() ->
Option.ofNullable(cfg.getString(KeyGeneratorOptions.PARTITIONPATH_FIELD_NAME)));
+ Option<String> partitionFieldsOpt;
+ if (StringUtils.nonEmpty(cfg.getString(META_SYNC_PARTITION_FIELDS))) {
+ partitionFieldsOpt =
Option.ofNullable(cfg.getString(META_SYNC_PARTITION_FIELDS));
Review Comment:
META_SYNC_PARTITION_FIELDS has default value, the inferring can be cut off.
So if META_SYNC_PARTITION_FIELDS is not empty, we will infer from it.
--
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]