This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 4777d415a27 branch-4.1: [fix](iow) force drop partition in INSERT 
OVERWRITE #62510 (#65030)
4777d415a27 is described below

commit 4777d415a27da87b8054b8131c388bc61f457ca4
Author: morrySnow <[email protected]>
AuthorDate: Wed Jul 1 10:54:20 2026 +0800

    branch-4.1: [fix](iow) force drop partition in INSERT OVERWRITE #62510 
(#65030)
    
    Backport #62510
    
    Co-authored-by: Claude <[email protected]>
---
 .../org/apache/doris/insertoverwrite/InsertOverwriteManager.java     | 5 +++--
 .../trees/plans/commands/insert/InsertOverwriteTableCommand.java     | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteManager.java
 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteManager.java
index 3f48a2130dc..b288c727f85 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteManager.java
@@ -177,7 +177,8 @@ public class InsertOverwriteManager extends MasterDaemon 
implements Writable {
     }
 
     // here we will make all raplacement of this group visiable. if someone 
fails, nothing happen.
-    public void taskGroupSuccess(long groupId, OlapTable targetTable) throws 
DdlException {
+    public void taskGroupSuccess(long groupId, OlapTable targetTable,
+            boolean forceDropPartition) throws DdlException {
         try {
             Map<Long, Long> relations = partitionPairs.get(groupId);
             ArrayList<String> oldNames = new ArrayList<>();
@@ -186,7 +187,7 @@ public class InsertOverwriteManager extends MasterDaemon 
implements Writable {
                 
oldNames.add(targetTable.getPartition(partitionPair.getKey()).getName());
                 
newNames.add(targetTable.getPartition(partitionPair.getValue()).getName());
             }
-            InsertOverwriteUtil.replacePartition(targetTable, oldNames, 
newNames);
+            InsertOverwriteUtil.replacePartition(targetTable, oldNames, 
newNames, forceDropPartition);
         } catch (Exception e) {
             LOG.warn("insert overwrite task making replacement failed because 
" + e.getMessage()
                     + "all new partition will not be visible and will be 
recycled by partition GC.");
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertOverwriteTableCommand.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertOverwriteTableCommand.java
index 3d378662540..efe049eda20 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertOverwriteTableCommand.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertOverwriteTableCommand.java
@@ -227,7 +227,7 @@ public class InsertOverwriteTableCommand extends Command 
implements NeedAuditEnc
                 // partitions and return. for transactional, the replacement 
will really occur when insert successed,
                 // i.e. `insertInto` finished. then we call taskGroupSuccess 
to make replacement.
                 insertIntoAutoDetect(ctx, executor, taskId);
-                insertOverwriteManager.taskGroupSuccess(taskId, (OlapTable) 
targetTable);
+                insertOverwriteManager.taskGroupSuccess(taskId, (OlapTable) 
targetTable, true);
             } else {
                 // it's overwrite table(as all partitions) or specific 
partition(s)
                 List<String> tempPartitionNames = 
InsertOverwriteUtil.generateTempPartitionNames(partitionNames);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to