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

starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


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

commit b30fbf99499b7d01d9adb2ef07fa82e3993a836c
Author: morrySnow <[email protected]>
AuthorDate: Thu May 14 12:14:14 2026 +0800

    [fix](iow) force drop partition in INSERT OVERWRITE (#62510)
    
    "Insert overwrite" can be achieved by using "replace partition". By
    default, the replaced partition will be placed in the recycle bin.
    However, in the "insert overwrite" scenario, the partitions placed in
    the recycle bin make it difficult to restore the table to its previous
    state. And if a large number of partitions are placed in the recycle
    bin, it will significantly increase the load of the recycle bin.
    Therefore, now the "insert overwrite" operation no longer places the
    replaced partitions into the recycle bin.
---
 .../doris/datasource/doris/FeServiceClient.java    |  4 +-
 .../AbstractInsertOverwriteManager.java            |  2 +-
 .../insertoverwrite/InsertOverwriteManager.java    |  4 +-
 .../RemoteInsertOverwriteManager.java              |  4 +-
 .../insert/InsertOverwriteTableCommand.java        |  4 +-
 .../apache/doris/service/FrontendServiceImpl.java  |  8 +-
 gensrc/thrift/FrontendService.thrift               |  1 +
 .../test_insert_overwrite_multiple.out             | 15 ----
 .../test_insert_overwrite_recover.out              | 14 ----
 .../test_insert_overwrite_recover_multiple.out     | 23 ------
 .../test_insert_overwrite_recover_no_partition.out | 14 ----
 .../test_insert_overwrite_multiple.groovy          | 68 -----------------
 .../test_insert_overwrite_recover.groovy           | 64 ----------------
 .../test_insert_overwrite_recover_multiple.groovy  | 87 ----------------------
 ...st_insert_overwrite_recover_no_partition.groovy | 78 -------------------
 15 files changed, 16 insertions(+), 374 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/doris/FeServiceClient.java
 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/doris/FeServiceClient.java
index 7bb02b4fa93..10ef6435ff1 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/datasource/doris/FeServiceClient.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/datasource/doris/FeServiceClient.java
@@ -588,7 +588,8 @@ public class FeServiceClient {
         }
     }
 
-    public void taskGroupSuccess(String catalogName, String dbName, String 
tableName, long groupId)
+    public void taskGroupSuccess(String catalogName, String dbName, String 
tableName,
+            long groupId, boolean forceDropPartition)
             throws DdlException {
         TInsertOverwriteTaskRequest request = new 
TInsertOverwriteTaskRequest();
         request.setUser(user);
@@ -598,6 +599,7 @@ public class FeServiceClient {
         request.setTbl(tableName);
         request.setGroupId(groupId);
         request.setIsSuccess(true);
+        request.setForceDropPartition(forceDropPartition);
         long startTime = System.currentTimeMillis();
         TInsertOverwriteTaskResult result;
         try {
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/AbstractInsertOverwriteManager.java
 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/AbstractInsertOverwriteManager.java
index 3fff2f7e3e6..50321927fc5 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/AbstractInsertOverwriteManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/AbstractInsertOverwriteManager.java
@@ -31,7 +31,7 @@ public interface AbstractInsertOverwriteManager {
 
     void registerTaskInGroup(long groupId, long taskId) throws Exception;
 
-    void taskGroupSuccess(long groupId, OlapTable targetTable) throws 
DdlException;
+    void taskGroupSuccess(long groupId, OlapTable targetTable, boolean 
forceDropPartition) throws DdlException;
 
     void taskSuccess(long taskId) throws Exception;
 
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 a3aa0a771c0..3f0f7feff41 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
@@ -190,7 +190,7 @@ public class InsertOverwriteManager extends MasterDaemon 
implements Writable, Ab
 
     // here we will make all raplacement of this group visiable. if someone 
fails, nothing happen.
     @Override
-    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<>();
@@ -199,7 +199,7 @@ public class InsertOverwriteManager extends MasterDaemon 
implements Writable, Ab
                 
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/insertoverwrite/RemoteInsertOverwriteManager.java
 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/RemoteInsertOverwriteManager.java
index abb602e4d35..4e21501c1ee 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/RemoteInsertOverwriteManager.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/RemoteInsertOverwriteManager.java
@@ -57,10 +57,10 @@ public class RemoteInsertOverwriteManager implements 
AbstractInsertOverwriteMana
     }
 
     @Override
-    public void taskGroupSuccess(long groupId, OlapTable targetTable) throws 
DdlException {
+    public void taskGroupSuccess(long groupId, OlapTable targetTable, boolean 
forceDropPartition) throws DdlException {
         catalog.getFeServiceClient()
                 .taskGroupSuccess(InternalCatalog.INTERNAL_CATALOG_NAME,
-                        targetTable.getDatabase().getFullName(), 
targetTable.getName(), groupId);
+                        targetTable.getDatabase().getFullName(), 
targetTable.getName(), groupId, forceDropPartition);
     }
 
     @Override
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 d23a4570c2d..7d5d0e49e77 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
@@ -236,7 +236,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, isForceDropPartition());
             } else {
                 // it's overwrite table(as all partitions) or specific 
partition(s)
                 List<String> tempPartitionNames = 
InsertOverwriteUtil.generateTempPartitionNames(partitionNames);
@@ -489,7 +489,7 @@ public class InsertOverwriteTableCommand extends Command 
implements NeedAuditEnc
     }
 
     public boolean isForceDropPartition() {
-        return false;
+        return true;
     }
 
     @Override
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java 
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 42a63d90961..308b1e1e51e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -2594,7 +2594,8 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
             }
             if (request.is_success) {
                 if (request.isSetGroupId()) {
-                    taskGroupSuccessImpl(request.getDb(), request.getTbl(), 
request.getGroupId());
+                    taskGroupSuccessImpl(request.getDb(), request.getTbl(),
+                            request.getGroupId(), 
request.isForceDropPartition());
                 } else if (request.isSetTaskId()) {
                     taskSuccessImpl(request.getTaskId());
                 }
@@ -2619,7 +2620,8 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
         return result;
     }
 
-    private void taskGroupSuccessImpl(String dbName, String tblName, long 
groupId) throws Exception {
+    private void taskGroupSuccessImpl(String dbName, String tblName,
+            long groupId, boolean forceDropPartition) throws Exception {
         DatabaseIf db = Env.getCurrentInternalCatalog().getDbNullable(dbName);
         if (db == null) {
             throw new DdlException("Database not found: " + dbName);
@@ -2631,7 +2633,7 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
         if (tbl == null) {
             throw new DdlException("Table not found: " + tblName);
         }
-        
Env.getCurrentEnv().getInsertOverwriteManager().taskGroupSuccess(groupId, 
(OlapTable) tbl);
+        
Env.getCurrentEnv().getInsertOverwriteManager().taskGroupSuccess(groupId, 
(OlapTable) tbl, forceDropPartition);
     }
 
     private void taskSuccessImpl(long taskId) throws Exception {
diff --git a/gensrc/thrift/FrontendService.thrift 
b/gensrc/thrift/FrontendService.thrift
index b424c31aa7f..436bdfd19c3 100644
--- a/gensrc/thrift/FrontendService.thrift
+++ b/gensrc/thrift/FrontendService.thrift
@@ -1837,6 +1837,7 @@ struct TInsertOverwriteTaskRequest {
     7: optional i64 group_id
     8: optional i64 task_id
     9: optional bool is_success
+    10: optional bool force_drop_partition
 }
 
 struct TInsertOverwriteTaskResult {
diff --git 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_multiple.out
 
b/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_multiple.out
deleted file mode 100644
index 64fd2a2dabd..00000000000
--- 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_multiple.out
+++ /dev/null
@@ -1,15 +0,0 @@
--- This file is automatically generated. You should know what you did if you 
want to edit this
--- !select_check_1 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
--- !select_check__value_should_be_3 --
-3      a       2024-01-02
-
--- !select_check__value_should_be_2 --
-2      a       2024-01-02
-
--- !select_check__value_should_be_3 --
-3      a       2024-01-02
-
diff --git 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover.out 
b/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover.out
deleted file mode 100644
index eae52360da6..00000000000
--- 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover.out
+++ /dev/null
@@ -1,14 +0,0 @@
--- This file is automatically generated. You should know what you did if you 
want to edit this
--- !select_check_1 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
--- !select_check_1 --
-3      a       2024-01-02
-
--- !select_check_1 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
diff --git 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover_multiple.out
 
b/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover_multiple.out
deleted file mode 100644
index 4930be08bd1..00000000000
--- 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover_multiple.out
+++ /dev/null
@@ -1,23 +0,0 @@
--- This file is automatically generated. You should know what you did if you 
want to edit this
--- !select_check_1 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
--- !select_check_2 --
-3      a       2024-01-02
-
--- !select_check_3 --
-4      a       2024-01-02
-
--- !select_check_recover_1_value4 --
-4      a       2024-01-02
-
--- !select_check_recover_2_value3 --
-3      a       2024-01-02
-
--- !select_check_recover_3_value123 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
diff --git 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover_no_partition.out
 
b/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover_no_partition.out
deleted file mode 100644
index a3effb99a08..00000000000
--- 
a/regression-test/data/catalog_recycle_bin_p0/test_insert_overwrite_recover_no_partition.out
+++ /dev/null
@@ -1,14 +0,0 @@
--- This file is automatically generated. You should know what you did if you 
want to edit this
--- !select_check_1 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
--- !select_check_2 --
-3      a       2024-01-02
-
--- !select_check_3 --
-1      a       2022-01-02
-2      a       2023-01-02
-3      a       2024-01-02
-
diff --git 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_multiple.groovy
 
b/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_multiple.groovy
deleted file mode 100644
index 94bc3f96ec4..00000000000
--- 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_multiple.groovy
+++ /dev/null
@@ -1,68 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-suite("test_insert_overwrite_multiple") {
-    def table = "test_insert_overwrite_multiple"
-
-    // create table and insert data
-    sql """ drop table if exists ${table}"""
-    sql """
-    create table ${table} (
-        `id` int(11),
-        `name` varchar(128),
-        `da` date
-    )
-    engine=olap
-    duplicate key(id)
-    partition by range(da)(
-        PARTITION p3 VALUES LESS THAN ('2023-01-01'),
-        PARTITION p4 VALUES LESS THAN ('2024-01-01'),
-        PARTITION p5 VALUES LESS THAN ('2025-01-01')
-    )
-    distributed by hash(id) buckets 2
-    properties(
-        "replication_num"="1",
-        "light_schema_change"="true"
-    );
-    """
-
-    sql """ insert into ${table} values(1, 'a', '2022-01-02'); """
-    sql """ insert into ${table} values(2, 'a', '2023-01-02'); """
-    sql """ insert into ${table} values(3, 'a', '2024-01-02'); """
-    sql """ SYNC;"""
-
-    qt_select_check_1 """ select * from  ${table} order by id,name,da; """
-
-    sql """ insert overwrite  table ${table} values(3, 'a', '2024-01-02'); """
-
-    qt_select_check__value_should_be_3 """ select * from  ${table} order by 
id,name,da; """
-
-    sql """ insert overwrite  table ${table} values(2, 'a', '2024-01-02'); """
-
-    qt_select_check__value_should_be_2 """ select * from  ${table} order by 
id,name,da; """
-
-    sql """ ALTER TABLE ${table} DROP PARTITION p3 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p4 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p5 force; """
-
-    sql """ recover partition p3  from ${table}; """
-    sql """ recover partition p4  from ${table}; """
-    sql """ recover partition p5  from ${table}; """    
-
-    qt_select_check__value_should_be_3 """ select * from  ${table} order by 
id,name,da; """
-
-}
diff --git 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover.groovy
 
b/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover.groovy
deleted file mode 100644
index 2668f1b2a71..00000000000
--- 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover.groovy
+++ /dev/null
@@ -1,64 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-suite("test_insert_overwrite_recover") {
-    def table = "test_insert_overwrite_recover"
-
-    // create table and insert data
-    sql """ drop table if exists ${table}"""
-    sql """
-    create table ${table} (
-        `id` int(11),
-        `name` varchar(128),
-        `da` date
-    )
-    engine=olap
-    duplicate key(id)
-    partition by range(da)(
-        PARTITION p3 VALUES LESS THAN ('2023-01-01'),
-        PARTITION p4 VALUES LESS THAN ('2024-01-01'),
-        PARTITION p5 VALUES LESS THAN ('2025-01-01')
-    )
-    distributed by hash(id) buckets 2
-    properties(
-        "replication_num"="1",
-        "light_schema_change"="true"
-    );
-    """
-
-    sql """ insert into ${table} values(1, 'a', '2022-01-02'); """
-    sql """ insert into ${table} values(2, 'a', '2023-01-02'); """
-    sql """ insert into ${table} values(3, 'a', '2024-01-02'); """
-    sql """ SYNC;"""
-
-    qt_select_check_1 """ select * from  ${table} order by id,name,da; """
-
-    sql """ insert overwrite  table ${table} values(3, 'a', '2024-01-02'); """
-
-    qt_select_check_1 """ select * from  ${table} order by id,name,da; """
-    
-    sql """ ALTER TABLE ${table} DROP PARTITION p3 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p4 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p5 force; """
-
-    sql """ recover partition p3  from ${table}; """
-    sql """ recover partition p4  from ${table}; """
-    sql """ recover partition p5  from ${table}; """    
-
-    qt_select_check_1 """ select * from  ${table} order by id,name,da; """
-
-}
diff --git 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover_multiple.groovy
 
b/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover_multiple.groovy
deleted file mode 100644
index e7f65e82610..00000000000
--- 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover_multiple.groovy
+++ /dev/null
@@ -1,87 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-suite("test_insert_overwrite_recover_multiple") {
-    def table = "test_insert_overwrite_recover_multiple"
-
-    // create table and insert data
-    sql """ drop table if exists ${table}"""
-    sql """
-    create table ${table} (
-        `id` int(11),
-        `name` varchar(128),
-        `da` date
-    )
-    engine=olap
-    duplicate key(id)
-    partition by range(da)(
-        PARTITION p3 VALUES LESS THAN ('2023-01-01'),
-        PARTITION p4 VALUES LESS THAN ('2024-01-01'),
-        PARTITION p5 VALUES LESS THAN ('2025-01-01')
-    )
-    distributed by hash(id) buckets 2
-    properties(
-        "replication_num"="1",
-        "light_schema_change"="true"
-    );
-    """
-
-    sql """ insert into ${table} values(1, 'a', '2022-01-02'); """
-    sql """ insert into ${table} values(2, 'a', '2023-01-02'); """
-    sql """ insert into ${table} values(3, 'a', '2024-01-02'); """
-    sql """ SYNC;"""
-
-    qt_select_check_1 """ select * from  ${table} order by id,name,da; """
-
-    sql """ insert overwrite  table ${table} values(3, 'a', '2024-01-02'); """
-
-    qt_select_check_2 """ select * from  ${table} order by id,name,da; """
-
-    sql """ insert overwrite  table ${table} values(4, 'a', '2024-01-02'); """
-
-    qt_select_check_3 """ select * from  ${table} order by id,name,da; """    
-    
-    sql """ ALTER TABLE ${table} DROP PARTITION p3; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p4; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p5; """
-
-    sql """ recover partition p3  from ${table}; """
-    sql """ recover partition p4  from ${table}; """
-    sql """ recover partition p5  from ${table}; """    
-
-    qt_select_check_recover_1_value4 """ select * from  ${table} order by 
id,name,da; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p3 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p4 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p5 force; """
-
-    sql """ recover partition p3  from ${table}; """
-    sql """ recover partition p4  from ${table}; """
-    sql """ recover partition p5  from ${table}; """    
-
-    qt_select_check_recover_2_value3 """ select * from  ${table} order by 
id,name,da; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p3 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p4 force; """
-    sql """ ALTER TABLE ${table} DROP PARTITION p5 force; """
-
-    sql """ recover partition p3  from ${table}; """
-    sql """ recover partition p4  from ${table}; """
-    sql """ recover partition p5  from ${table}; """    
-
-    qt_select_check_recover_3_value123 """ select * from  ${table} order by 
id,name,da; """    
-
-
-}
diff --git 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover_no_partition.groovy
 
b/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover_no_partition.groovy
deleted file mode 100644
index af5526a22b2..00000000000
--- 
a/regression-test/suites/catalog_recycle_bin_p0/test_insert_overwrite_recover_no_partition.groovy
+++ /dev/null
@@ -1,78 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-suite("test_insert_overwrite_recover_no_partition") {
-    def table = "test_insert_overwrite_recover_no_partition"
-    def table_bk = "test_insert_overwrite_recover_no_partition_backup"
-    // create table and insert data for range.
-    sql """ drop table if exists ${table} force"""
-    sql """
-    create table ${table} (
-        `id` int(11),
-        `name` varchar(128),
-        `da` date
-    )
-    engine=olap
-    duplicate key(id)
-    distributed by hash(id) buckets 2
-    properties(
-        "replication_num"="1",
-        "light_schema_change"="true"
-    );
-    """
-
-    sql """ insert into ${table} values(1, 'a', '2022-01-02'); """
-    sql """ insert into ${table} values(2, 'a', '2023-01-02'); """
-    sql """ insert into ${table} values(3, 'a', '2024-01-02'); """
-    sql """ SYNC;"""
-
-    qt_select_check_1 """ select * from  ${table} order by id,name,da; """
-
-    sql """ insert overwrite  table ${table} values(3, 'a', '2024-01-02'); """
-
-    
-    qt_select_check_2 """ select * from  ${table} order by id,name,da; """
-    
-    // now unpartition data is kept inside the recycle bin.
-    // we need to recover it as another partition in the table.
-    sql """ recover partition ${table} as p2  from ${table}; """
-
-    // create a table to copy the data only for partition p2.
-
-    sql """ drop table if exists ${table_bk} force"""
-    sql """
-    create table ${table_bk} (
-        `id` int(11),
-        `name` varchar(128),
-        `da` date
-    )
-    engine=olap
-    duplicate key(id)
-    distributed by hash(id) buckets 2
-    properties(
-        "replication_num"="1",
-        "light_schema_change"="true"
-    );
-    """
-    sql """ insert into ${table_bk} select * from ${table} partition p2; """
-
-    sql """ alter table ${table} replace with table ${table_bk}; """
-
-    // data from the select should be same as data before overwrite.
-    qt_select_check_3 """ select * from  ${table} order by id,name,da; """
-
-}


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

Reply via email to