waywtdcc commented on code in PR #7295:
URL: https://github.com/apache/hudi/pull/7295#discussion_r1032500225
##########
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:
Because spark uses the hoodie.datasource.write.hive_style_partitioning
property to be true when creating hudi non-partitioned tables, and records
hoodie.datasource.write.hive_style_partitioning=true in hoodie.properties. But
this property is not seen in hoodiehivecatalog, and inferred It is also
inferred that it is wrong, so hoodie.datasource.write.hive_style_partitioning
is assigned a value of false and uploaded to hive options. As a result, spark
has two different hoodie.datasource.write.hive_style_partitioning attribute
values when viewing the table, thus reporting an 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]