From 199cb3491603967ee52119e792535820f085397a Mon Sep 17 00:00:00 2001 From: wuwenchi Date: Mon, 29 Apr 2024 14:08:36 +0800 Subject: [PATCH 1/2] fix --- .../org/apache/doris/datasource/hive/HMSTransaction.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java index 32dd083c2adaf5..56e768f4ea8ed6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java @@ -1109,7 +1109,8 @@ public void prepareAlterTable(TableAndMore tableAndMore) { String writePath = tableAndMore.getCurrentLocation(); if (!targetPath.equals(writePath)) { Path path = new Path(targetPath); - String oldTablePath = new Path(path.getParent(), "_temp_" + path.getName()).toString(); + String oldTablePath = new Path( + path.getParent(), "_temp_" + queryId + "_" + path.getName()).toString(); Status status = wrapperRenameDirWithProfileSummary( targetPath, oldTablePath, @@ -1242,7 +1243,8 @@ public void prepareAlterPartition(PartitionAndMore partitionAndMore) { if (!targetPath.equals(writePath)) { Path path = new Path(targetPath); - String oldPartitionPath = new Path(path.getParent(), "_temp_" + path.getName()).toString(); + String oldPartitionPath = new Path(path.getParent(), + "_temp_" + queryId + "_" + path.getName()).toString(); Status status = wrapperRenameDirWithProfileSummary( targetPath, oldPartitionPath, From bfbfdc67de279bad97ef64ed6f225c627f12e7e7 Mon Sep 17 00:00:00 2001 From: wuwenchi Date: Mon, 29 Apr 2024 14:15:05 +0800 Subject: [PATCH 2/2] fix --- .../java/org/apache/doris/datasource/hive/HMSTransaction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java index 56e768f4ea8ed6..27f7737985be48 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSTransaction.java @@ -1243,8 +1243,8 @@ public void prepareAlterPartition(PartitionAndMore partitionAndMore) { if (!targetPath.equals(writePath)) { Path path = new Path(targetPath); - String oldPartitionPath = new Path(path.getParent(), - "_temp_" + queryId + "_" + path.getName()).toString(); + String oldPartitionPath = new Path( + path.getParent(), "_temp_" + queryId + "_" + path.getName()).toString(); Status status = wrapperRenameDirWithProfileSummary( targetPath, oldPartitionPath,