codope commented on code in PR #6329:
URL: https://github.com/apache/hudi/pull/6329#discussion_r940942901


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/HMSDDLExecutor.java:
##########
@@ -225,8 +225,9 @@ public void updatePartitionsToTable(String tableName, 
List<String> changedPartit
         String fullPartitionPath = 
StorageSchemes.HDFS.getScheme().equals(partitionScheme)
             ? 
FSUtils.getDFSFullPartitionPath(syncConfig.getHadoopFileSystem(), 
partitionPath) : partitionPath.toString();
         List<String> partitionValues = 
partitionValueExtractor.extractPartitionValuesInPath(partition);
-        sd.setLocation(fullPartitionPath);
-        return new Partition(partitionValues, databaseName, tableName, 0, 0, 
sd, null);
+        StorageDescriptor partitionSd = sd.deepCopy();
+        partitionSd.setLocation(fullPartitionPath);

Review Comment:
   Great catch! Let's take it in 0.12.0. We should cover adding multiple 
partitions in a test. I can add it later.



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