You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "BruceKellan (via GitHub)" <gi...@apache.org> on 2023/01/21 00:24:12 UTC

[GitHub] [hudi] BruceKellan commented on a diff in pull request #7445: [HUDI-5380] Fixing change table path but table location in metastore …

BruceKellan commented on code in PR #7445:
URL: https://github.com/apache/hudi/pull/7445#discussion_r1058717932


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HoodieHiveSyncClient.java:
##########
@@ -312,6 +314,16 @@ public void updateLastCommitTimeSynced(String tableName) {
     if (lastCommitSynced.isPresent()) {
       try {
         Table table = client.getTable(databaseName, tableName);
+        String basePath = config.getString(META_SYNC_BASE_PATH);
+        StorageDescriptor sd = table.getSd();
+        sd.setLocation(basePath);
+        SerDeInfo serdeInfo = sd.getSerdeInfo();
+        Map<String, String> serdePathProperties = SparkDataSourceTableUtils.getSparkSerdePathProperties(basePath);
+        for (Map.Entry<String, String> entry : serdePathProperties.entrySet()) {

Review Comment:
   I also considered this problem at the beginning, but later found that there is no improvement in efficiency, because every time the alter table API passes the `table` object, it means every update. All we do is to ensure the correctness of the base path in the `table` object.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org