BruceKellan commented on code in PR #6329:
URL: https://github.com/apache/hudi/pull/6329#discussion_r940916733
##########
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:
Yes, the location for partition is wrong. It will cause the query result to
be wrong when using hive or trino. These queries rely on the partition location
recorded in the metastore.
--
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]