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

dataroaring 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 b0f2c17fee2 [fix](cluster key) fix some case (#44881)
b0f2c17fee2 is described below

commit b0f2c17fee2e6b5de0213db5c7b4f5a8b6e740b0
Author: meiyi <[email protected]>
AuthorDate: Tue Dec 3 11:25:39 2024 +0800

    [fix](cluster key) fix some case (#44881)
---
 .../data/compaction/test_full_compaction.out       |  4 ++++
 ..._compaction.out => test_full_compaction_ck.out} |  8 ++++++--
 .../test_generated_column_nereids.out              | 12 ++++++------
 .../org/apache/doris/regression/Config.groovy      | 10 +++++++++-
 .../suites/compaction/test_full_compaction.groovy  |  5 +++++
 ...ction.groovy => test_full_compaction_ck.groovy} | 12 +++++++++---
 .../test_generated_column_nereids.groovy           | 22 +++++++++++++---------
 7 files changed, 52 insertions(+), 21 deletions(-)

diff --git a/regression-test/data/compaction/test_full_compaction.out 
b/regression-test/data/compaction/test_full_compaction.out
index b25fdad9314..aaab47b4c36 100644
--- a/regression-test/data/compaction/test_full_compaction.out
+++ b/regression-test/data/compaction/test_full_compaction.out
@@ -41,3 +41,7 @@
 2      200
 3      0
 
+-- !select_final2 --
+1      100
+2      200
+
diff --git a/regression-test/data/compaction/test_full_compaction.out 
b/regression-test/data/compaction/test_full_compaction_ck.out
similarity index 87%
copy from regression-test/data/compaction/test_full_compaction.out
copy to regression-test/data/compaction/test_full_compaction_ck.out
index b25fdad9314..f76314e79a7 100644
--- a/regression-test/data/compaction/test_full_compaction.out
+++ b/regression-test/data/compaction/test_full_compaction_ck.out
@@ -32,12 +32,16 @@
 2      2
 2      20
 2      200
-3      0
+3      100
 3      100
 3      300
 
 -- !select_final --
 1      100
 2      200
-3      0
+3      100
+
+-- !select_final2 --
+1      100
+2      200
 
diff --git 
a/regression-test/data/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.out
 
b/regression-test/data/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.out
index b7757222ab4..24f2f19c576 100644
--- 
a/regression-test/data/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.out
+++ 
b/regression-test/data/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.out
@@ -170,12 +170,6 @@ c  double  No      false   \N      NONE,STORED GENERATED
 b      int     Yes     false   \N      NONE
 d      int     Yes     false   \N      NONE,STORED GENERATED
 
--- !test_update --
-1
-
--- !test_update_generated_column --
-1      20      21
-
 -- !gen_col_unique_key --
 0
 
@@ -221,3 +215,9 @@ d   int     Yes     false   \N      NONE,STORED GENERATED
 -- !agg_replace_null --
 1      2       3       4       13
 
+-- !test_update --
+1
+
+-- !test_update_generated_column --
+1      20      21
+
diff --git 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
index 379d177fbc2..2f632f5c925 100644
--- 
a/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
+++ 
b/regression-test/framework/src/main/groovy/org/apache/doris/regression/Config.groovy
@@ -1028,7 +1028,15 @@ class Config {
             excludeDirectorySet.add("fault_injection_p0/partial_update")
             excludeDirectorySet.add("fault_injection_p0/flexible")
             excludeDirectorySet.add("doc")
-            List<String> excludeCases = ["test_table_properties", 
"test_default_hll", "test_default_pi", "test_full_compaction", 
"test_full_compaction_by_table_id", "test_create_table", "txn_insert", 
"test_update_mow", "test_new_update", "test_update_unique", 
"test_partial_update_generated_column", 
"nereids_partial_update_native_insert_stmt", "partial_update", 
"nereids_update_on_current_timestamp", "update_on_current_timestamp", 
"test_default_bitmap_empty", "nereids_delete_mow_partial_up [...]
+            excludeDirectorySet.add("schema_change_p0/unique_ck")
+            List<String> excludeCases = ["test_table_properties", 
"test_create_table"
+                , "test_default_hll", "test_default_pi", 
"test_default_bitmap_empty"
+                // partial update
+                , "txn_insert", "test_update_schema_change", 
"test_generated_column_update", "test_nested_type_with_rowstore", 
"test_partial_update_generated_column", 
"nereids_partial_update_native_insert_stmt"
+                , "partial_update", "nereids_update_on_current_timestamp", 
"update_on_current_timestamp", "nereids_delete_mow_partial_update", 
"delete_mow_partial_update", "test_unique_table_auto_inc"
+                , "test_unique_table_auto_inc_partial_update_correct_insert", 
"partial_update_seq_col", "nereids_partial_update_native_insert_stmt_complex", 
"regression_test_variant_delete_and_update"
+                , 
"test_unique_table_auto_inc_partial_update_correct_stream_load", 
"test_update_mow", "test_new_update", "test_update_unique", 
"nereids_partial_update_native_insert_seq_col"
+                , "test_partial_update_rowset_not_found_fault_injection"]
             for (def excludeCase in excludeCases) {
                 excludeSuiteWildcard.add(excludeCase)
             }
diff --git a/regression-test/suites/compaction/test_full_compaction.groovy 
b/regression-test/suites/compaction/test_full_compaction.groovy
index 60f52f6f5a5..ed2d2ce5bc5 100644
--- a/regression-test/suites/compaction/test_full_compaction.groovy
+++ b/regression-test/suites/compaction/test_full_compaction.groovy
@@ -177,6 +177,11 @@ suite("test_full_compaction") {
         // make sure all hidden data has been deleted
         // (1,100)(2,200)
         qt_select_final """select * from ${tableName} order by user_id"""
+
+        sql "SET skip_delete_predicate = false"
+        sql "SET skip_delete_sign = false"
+        sql "SET skip_delete_bitmap = false"
+        qt_select_final2 """select * from ${tableName} order by user_id"""
     } finally {
         try_sql("DROP TABLE IF EXISTS ${tableName}")
     }
diff --git a/regression-test/suites/compaction/test_full_compaction.groovy 
b/regression-test/suites/compaction/test_full_compaction_ck.groovy
similarity index 95%
copy from regression-test/suites/compaction/test_full_compaction.groovy
copy to regression-test/suites/compaction/test_full_compaction_ck.groovy
index 60f52f6f5a5..8e2f86c596d 100644
--- a/regression-test/suites/compaction/test_full_compaction.groovy
+++ b/regression-test/suites/compaction/test_full_compaction_ck.groovy
@@ -17,8 +17,8 @@
 
 import org.codehaus.groovy.runtime.IOGroovyMethods
 
-suite("test_full_compaction") {
-    def tableName = "test_full_compaction"
+suite("test_full_compaction_ck") {
+    def tableName = "test_full_compaction_ck"
 
     try {
         String backend_id;
@@ -47,6 +47,7 @@ suite("test_full_compaction") {
             CREATE TABLE ${tableName} (
             `user_id` INT NOT NULL, `value` INT NOT NULL)
             UNIQUE KEY(`user_id`) 
+            CLUSTER BY(`value`)
             DISTRIBUTED BY HASH(`user_id`) 
             BUCKETS 1 
             PROPERTIES ("replication_allocation" = "tag.location.default: 1",
@@ -177,7 +178,12 @@ suite("test_full_compaction") {
         // make sure all hidden data has been deleted
         // (1,100)(2,200)
         qt_select_final """select * from ${tableName} order by user_id"""
+
+        sql "SET skip_delete_predicate = false"
+        sql "SET skip_delete_sign = false"
+        sql "SET skip_delete_bitmap = false"
+        qt_select_final2 """select * from ${tableName} order by user_id"""
     } finally {
-        try_sql("DROP TABLE IF EXISTS ${tableName}")
+        // try_sql("DROP TABLE IF EXISTS ${tableName}")
     }
 }
diff --git 
a/regression-test/suites/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.groovy
 
b/regression-test/suites/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.groovy
index 36fbf9d80aa..b22b7d82ae3 100644
--- 
a/regression-test/suites/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.groovy
+++ 
b/regression-test/suites/ddl_p0/test_create_table_generated_column/test_generated_column_nereids.groovy
@@ -134,15 +134,6 @@ suite("test_generated_column") {
 
     qt_describe "describe gencol_refer_gencol"
 
-    //test update
-    sql "drop table if exists test_gen_col_update"
-    sql """create table test_gen_col_update (a int, b int, c int as (a+b))
-    unique key(a)
-    distributed by hash(a) properties("replication_num"="1")"""
-    sql "insert into test_gen_col_update values(1,3,default)"
-    qt_test_update "update test_gen_col_update set b=20"
-    qt_test_update_generated_column "select * from test_gen_col_update"
-
     // test unique table, generated column is not key
     sql "drop table if exists test_gen_col_unique_key"
     qt_gen_col_unique_key """create table test_gen_col_unique_key(a int,b 
int,c int generated always as (abs(a+b)) not null)
@@ -233,4 +224,17 @@ suite("test_generated_column") {
         PROPERTIES("replication_num" = "1");"""
         exception "The generated columns can be key columns, or value columns 
of replace and replace_if_not_null aggregation type."
     }
+
+    //test update
+    sql "drop table if exists test_gen_col_update"
+    sql """create table test_gen_col_update (a int, b int, c int as (a+b))
+    unique key(a)
+    distributed by hash(a) properties("replication_num"="1")"""
+    sql "insert into test_gen_col_update values(1,3,default)"
+    if (!isClusterKeyEnabled()) {
+        qt_test_update "update test_gen_col_update set b=20"
+        qt_test_update_generated_column "select * from test_gen_col_update"
+    } else {
+        // errCode = 2, detailMessage = The value specified for generated 
column 'c' in table 'test_gen_col_update' is not allowed
+    }
 }
\ No newline at end of file


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

Reply via email to