xiaozhch5 commented on code in PR #6368:
URL: https://github.com/apache/hudi/pull/6368#discussion_r944519923


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/HoodieHiveCatalog.java:
##########
@@ -893,7 +893,13 @@ private Map<String, String> supplementOptions(
     } else {
       Map<String, String> newOptions = new HashMap<>(options);
       // set up hive sync options
-      newOptions.put(FlinkOptions.HIVE_SYNC_ENABLED.key(), "true");
+      if (!newOptions.containsKey(FlinkOptions.HIVE_SYNC_ENABLED.key())) {
+        newOptions.put(FlinkOptions.HIVE_SYNC_ENABLED.key(), "true");
+      }
+      if (newOptions.containsKey(FlinkOptions.HIVE_STYLE_PARTITIONING.key())
+          && 
"true".equals(newOptions.get(FlinkOptions.HIVE_STYLE_PARTITIONING.key()))) {
+        
newOptions.put(FlinkOptions.HIVE_SYNC_PARTITION_EXTRACTOR_CLASS_NAME.key(), 
"org.apache.hudi.hive.HiveStylePartitionValueExtractor");

Review Comment:
   There are inferential relationships for some configurations, and it would be 
great if those relationships could all be identified somewhere. I will close 
this PR pending this new feature.



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