danny0405 commented on code in PR #6368:
URL: https://github.com/apache/hudi/pull/6368#discussion_r944088981
##########
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:
Maybe we should just fix `HoodieTableFactory#setupHiveOptions` first, there
is no good way for inference now for flink options yet, was planning to move
the inference logic to separate clazz so the other clazz like
`HoodieFlinkStreamer` can also use 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]