waywtdcc commented on code in PR #7295:
URL: https://github.com/apache/hudi/pull/7295#discussion_r1032504693
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/HoodieHiveCatalog.java:
##########
@@ -382,6 +383,8 @@ private Table translateSparkTable2Flink(ObjectPath
tablePath, Table hiveTable) {
parameters.putAll(TableOptionProperties.translateSparkTableProperties2Flink(hiveTable));
String path = hiveTable.getSd().getLocation();
parameters.put(PATH.key(), path);
+ Map<String, String> hoodieProps = loadFromHoodiePropertieFile(path,
hiveConf);
+
parameters.putAll(TableOptionProperties.translateSparkTableProperties2Flink(hoodieProps));
if
(!parameters.containsKey(FlinkOptions.HIVE_STYLE_PARTITIONING.key())) {
Review Comment:
if (!parameters.containsKey(FlinkOptions.HIVE_STYLE_PARTITIONING.key())) {
Path hoodieTablePath = new Path(path);
boolean hiveStyle = Arrays.stream(FSUtils.getFs(hoodieTablePath,
hiveConf).listStatus(hoodieTablePath))
.map(fileStatus -> fileStatus.getPath().getName())
.filter(f -> !f.equals(".hoodie") && !f.equals("default"))
.anyMatch(FilePathUtils::isHiveStylePartitioning);
parameters.put(FlinkOptions.HIVE_STYLE_PARTITIONING.key(),
String.valueOf(hiveStyle));
}
--- The params in this code are not inferred according to the
hoodie.properties property file, resulting in an inference error.
--
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]