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

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

commit 5675d45261abd538be0f0b434f69ec2d2819bb8d
Author: Dongyang Li <[email protected]>
AuthorDate: Mon Aug 21 11:27:53 2023 +0800

    [fix](case) nereids_p0/update/update_unique_table.groovy (#23195)
    
    fix cases in order to run without load data
---
 .../nereids_p0/insert_into_table/aggregate.groovy  |  3 +
 .../nereids_p0/insert_into_table/duplicate.groovy  | 12 ++++
 .../insert_into_table/no_partition.groovy          | 38 ++++++++++
 .../nereids_p0/insert_into_table/random.groovy     |  4 ++
 .../insert_into_table/type_cast_duplicate.groovy   | 10 +++
 .../nereids_p0/insert_into_table/unique.groovy     |  6 ++
 .../suites/nereids_p0/update/load.groovy           | 84 ----------------------
 .../nereids_p0/update/update_unique_table.groovy   | 65 +++++++++++++++++
 8 files changed, 138 insertions(+), 84 deletions(-)

diff --git 
a/regression-test/suites/nereids_p0/insert_into_table/aggregate.groovy 
b/regression-test/suites/nereids_p0/insert_into_table/aggregate.groovy
index 53ed03d3d0..93479561e3 100644
--- a/regression-test/suites/nereids_p0/insert_into_table/aggregate.groovy
+++ b/regression-test/suites/nereids_p0/insert_into_table/aggregate.groovy
@@ -100,4 +100,7 @@ suite("nereids_insert_aggregate") {
             select * except(kaint) from src where id is not null'''
     sql 'sync'
     qt_lsc2 'select * from agg_light_sc_not_null_t order by id, kint'
+
+    sql 'alter table agg_light_sc_t rename column ktinyint ktint'
+    sql 'alter table agg_light_sc_not_null_t rename column ktinyint ktint'
 }
\ No newline at end of file
diff --git 
a/regression-test/suites/nereids_p0/insert_into_table/duplicate.groovy 
b/regression-test/suites/nereids_p0/insert_into_table/duplicate.groovy
index cc6428df07..8b655cc9d8 100644
--- a/regression-test/suites/nereids_p0/insert_into_table/duplicate.groovy
+++ b/regression-test/suites/nereids_p0/insert_into_table/duplicate.groovy
@@ -101,4 +101,16 @@ suite("nereids_insert_duplicate") {
             select * except(kaint) from src where id is not null'''
     sql 'sync'
     qt_lsc2 'select * from dup_light_sc_not_null_t order by id, kint'
+
+    sql 'set delete_without_partition=true'
+    sql '''delete from dup_t where id is not null'''
+    sql '''delete from dup_t where id is null'''
+    sql '''delete from dup_light_sc_t where id is not null'''
+    sql '''delete from dup_light_sc_t where id is null'''
+    sql '''delete from dup_not_null_t where id is not null'''
+    sql '''delete from dup_not_null_t where id is null'''
+    sql '''delete from dup_light_sc_not_null_t where id is not null'''
+    sql '''delete from dup_light_sc_not_null_t where id is null'''
+    sql 'alter table dup_light_sc_t rename column ktinyint ktint'
+    sql 'alter table dup_light_sc_not_null_t rename column ktinyint ktint'
 }
\ No newline at end of file
diff --git 
a/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy 
b/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy
index 48f3890153..d5f39b76b8 100644
--- a/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy
+++ b/regression-test/suites/nereids_p0/insert_into_table/no_partition.groovy
@@ -263,4 +263,42 @@ suite('nereids_insert_no_partition') {
             select * except(kaint) from src where id is not null'''
     sql 'sync'
     qt_lsc4 'select * from uni_light_sc_mow_not_null_nop_t order by id, kint'
+
+    sql 'set delete_without_partition=true'
+    sql '''delete from agg_nop_t where id is not null'''
+    sql '''delete from agg_nop_t where id is null'''
+    sql '''delete from agg_light_sc_nop_t where id is not null'''
+    sql '''delete from agg_light_sc_nop_t where id is null'''
+    sql '''delete from agg_not_null_nop_t where id is not null'''
+    sql '''delete from agg_not_null_nop_t where id is null'''
+    sql '''delete from agg_light_sc_not_null_nop_t where id is not null'''
+    sql '''delete from agg_light_sc_not_null_nop_t where id is null'''
+    sql '''delete from dup_nop_t where id is not null'''
+    sql '''delete from dup_nop_t where id is null'''
+    sql '''delete from dup_light_sc_nop_t where id is not null'''
+    sql '''delete from dup_light_sc_nop_t where id is null'''
+    sql '''delete from dup_not_null_nop_t where id is not null'''
+    sql '''delete from dup_not_null_nop_t where id is null'''
+    sql '''delete from dup_light_sc_not_null_nop_t where id is not null'''
+    sql '''delete from dup_light_sc_not_null_nop_t where id is null'''
+    sql '''delete from uni_nop_t where id is not null'''
+    sql '''delete from uni_nop_t where id is null'''
+    sql '''delete from uni_light_sc_nop_t where id is not null'''
+    sql '''delete from uni_light_sc_nop_t where id is null'''
+    sql '''delete from uni_mow_nop_t where id is not null'''
+    sql '''delete from uni_mow_nop_t where id is null'''
+    sql '''delete from uni_light_sc_mow_nop_t where id is not null'''
+    sql '''delete from uni_light_sc_mow_nop_t where id is null'''
+    sql '''delete from uni_mow_not_null_nop_t where id is not null'''
+    sql '''delete from uni_mow_not_null_nop_t where id is null'''
+    sql '''delete from uni_light_sc_mow_not_null_nop_t where id is not null'''
+    sql '''delete from uni_light_sc_mow_not_null_nop_t where id is null'''
+    sql 'alter table agg_light_sc_nop_t rename column ktinyint ktint'
+    sql 'alter table agg_light_sc_not_null_nop_t rename column ktinyint ktint'
+    sql 'alter table dup_light_sc_nop_t rename column ktinyint ktint'
+    sql 'alter table dup_light_sc_not_null_nop_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_nop_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_mow_nop_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_not_null_nop_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_mow_not_null_nop_t rename column ktinyint 
ktint'
 }
\ No newline at end of file
diff --git a/regression-test/suites/nereids_p0/insert_into_table/random.groovy 
b/regression-test/suites/nereids_p0/insert_into_table/random.groovy
index 03803d5554..6cc5cb2b99 100644
--- a/regression-test/suites/nereids_p0/insert_into_table/random.groovy
+++ b/regression-test/suites/nereids_p0/insert_into_table/random.groovy
@@ -39,4 +39,8 @@ suite('nereids_insert_random') {
             select id, ktint, ksint, kint, kbint, kdtv2, kdtm, kdbl from src 
where id < 4'''
     sql 'sync'
     qt_13 'select * from dup_t_type_cast_rd order by id, kint'
+
+    sql 'set delete_without_partition=true'
+    sql '''delete from dup_t_type_cast_rd where id is not null'''
+    sql '''delete from dup_t_type_cast_rd where id is null'''
 }
diff --git 
a/regression-test/suites/nereids_p0/insert_into_table/type_cast_duplicate.groovy
 
b/regression-test/suites/nereids_p0/insert_into_table/type_cast_duplicate.groovy
index 524f299dd4..0cc52d80d3 100644
--- 
a/regression-test/suites/nereids_p0/insert_into_table/type_cast_duplicate.groovy
+++ 
b/regression-test/suites/nereids_p0/insert_into_table/type_cast_duplicate.groovy
@@ -87,4 +87,14 @@ suite("nereids_insert_duplicate") {
             select id, ktint, ksint, kint, kbint, kdtv2, kdtm, kdbl from src 
where id < 4 and id is not null'''
     sql 'sync'
     qt_43 'select * from dup_light_sc_not_null_t_type_cast order by id, kint'
+
+    sql 'set delete_without_partition=true'
+    sql '''delete from dup_t_type_cast where id is not null'''
+    sql '''delete from dup_t_type_cast where id is null'''
+    sql '''delete from dup_light_sc_t_type_cast where id is not null'''
+    sql '''delete from dup_light_sc_t_type_cast where id is null'''
+    sql '''delete from dup_not_null_t_type_cast where id is not null'''
+    sql '''delete from dup_not_null_t_type_cast where id is null'''
+    sql '''delete from dup_light_sc_not_null_t_type_cast where id is not 
null'''
+    sql '''delete from dup_light_sc_not_null_t_type_cast where id is null'''
 }
\ No newline at end of file
diff --git a/regression-test/suites/nereids_p0/insert_into_table/unique.groovy 
b/regression-test/suites/nereids_p0/insert_into_table/unique.groovy
index f124c4d941..685883ef6e 100644
--- a/regression-test/suites/nereids_p0/insert_into_table/unique.groovy
+++ b/regression-test/suites/nereids_p0/insert_into_table/unique.groovy
@@ -177,4 +177,10 @@ suite("nereids_insert_unique") {
             select * except(kaint) from src where id is not null'''
     sql 'sync'
     qt_lsc4 'select * from uni_light_sc_mow_not_null_t order by id, kint'
+
+    sql 'alter table uni_light_sc_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_mow_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_not_null_t rename column ktinyint ktint'
+    sql 'alter table uni_light_sc_mow_not_null_t rename column ktinyint ktint'
+
 }
\ No newline at end of file
diff --git a/regression-test/suites/nereids_p0/update/load.groovy 
b/regression-test/suites/nereids_p0/update/load.groovy
deleted file mode 100644
index 6415361b09..0000000000
--- a/regression-test/suites/nereids_p0/update/load.groovy
+++ /dev/null
@@ -1,84 +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("load") {
-    sql 'drop table if exists t1'
-    sql '''
-        create table t1 (
-            id int,
-            id1 int,
-            c1 bigint,
-            c2 string,
-            c3 double,
-            c4 date
-        ) unique key (id, id1)
-        distributed by hash(id, id1)
-        properties(
-            'replication_num'='1',
-            "function_column.sequence_col" = "c4"
-        );
-    '''
-
-    sql 'drop table if exists t2'
-    sql '''
-        create table t2 (
-            id int,
-            c1 bigint,
-            c2 string,
-            c3 double,
-            c4 date
-        ) unique key (id)
-        distributed by hash(id)
-        properties(
-            'replication_num'='1'
-        );
-    '''
-
-    sql 'drop table if exists t3'
-    sql '''
-        create table t3 (
-            id int
-        ) distributed by hash(id)
-        properties(
-            'replication_num'='1'
-        );
-    '''
-
-    sql '''
-        INSERT INTO t1 VALUES
-            (1, 10, 1, '1', 1.0, '2000-01-01'),
-            (2, 20, 2, '2', 2.0, '2000-01-02'),
-            (3, 30, 3, '3', 3.0, '2000-01-03');
-    '''
-
-    sql '''
-
-        INSERT INTO t2 VALUES
-            (1, 10, '10', 10.0, '2000-01-10'),
-            (2, 20, '20', 20.0, '2000-01-20'),
-            (3, 30, '30', 30.0, '2000-01-30'),
-            (4, 4, '4', 4.0, '2000-01-04'),
-            (5, 5, '5', 5.0, '2000-01-05');
-    '''
-
-    sql '''
-        INSERT INTO t3 VALUES
-            (1),
-            (4),
-            (5);
-    '''
-}
diff --git 
a/regression-test/suites/nereids_p0/update/update_unique_table.groovy 
b/regression-test/suites/nereids_p0/update/update_unique_table.groovy
index 358a3bb9cf..59ea06b10b 100644
--- a/regression-test/suites/nereids_p0/update/update_unique_table.groovy
+++ b/regression-test/suites/nereids_p0/update/update_unique_table.groovy
@@ -16,6 +16,71 @@
 // under the License.
 
 suite('update_unique_table') {
+    sql 'drop table if exists t1'
+    sql '''
+        create table t1 (
+            id int,
+            id1 int,
+            c1 bigint,
+            c2 string,
+            c3 double,
+            c4 date
+        ) unique key (id, id1)
+        distributed by hash(id, id1)
+        properties(
+            'replication_num'='1',
+            "function_column.sequence_col" = "c4"
+        );
+    '''
+
+    sql 'drop table if exists t2'
+    sql '''
+        create table t2 (
+            id int,
+            c1 bigint,
+            c2 string,
+            c3 double,
+            c4 date
+        ) unique key (id)
+        distributed by hash(id)
+        properties(
+            'replication_num'='1'
+        );
+    '''
+
+    sql 'drop table if exists t3'
+    sql '''
+        create table t3 (
+            id int
+        ) distributed by hash(id)
+        properties(
+            'replication_num'='1'
+        );
+    '''
+
+    sql '''
+        INSERT INTO t1 VALUES
+            (1, 10, 1, '1', 1.0, '2000-01-01'),
+            (2, 20, 2, '2', 2.0, '2000-01-02'),
+            (3, 30, 3, '3', 3.0, '2000-01-03');
+    '''
+
+    sql '''
+
+        INSERT INTO t2 VALUES
+            (1, 10, '10', 10.0, '2000-01-10'),
+            (2, 20, '20', 20.0, '2000-01-20'),
+            (3, 30, '30', 30.0, '2000-01-30'),
+            (4, 4, '4', 4.0, '2000-01-04'),
+            (5, 5, '5', 5.0, '2000-01-05');
+    '''
+
+    sql '''
+        INSERT INTO t3 VALUES
+            (1),
+            (4),
+            (5);
+    '''
     sql 'set enable_nereids_planner=true'
     sql 'set enable_fallback_to_original_planner=false'
     sql 'set enable_nereids_dml=true'


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

Reply via email to