From 22e7e83c8e875964f8e031ba398107c3c8b408be Mon Sep 17 00:00:00 2001 From: shuke987 Date: Mon, 6 Jan 2025 09:35:11 +0800 Subject: [PATCH 1/4] fix case bug --- .../statistics/test_schema_change_statistics.groovy | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/regression-test/suites/statistics/test_schema_change_statistics.groovy b/regression-test/suites/statistics/test_schema_change_statistics.groovy index 20ba185fac8a4e..0c16a5a5bd2cb6 100644 --- a/regression-test/suites/statistics/test_schema_change_statistics.groovy +++ b/regression-test/suites/statistics/test_schema_change_statistics.groovy @@ -73,9 +73,7 @@ suite("test_schema_change_statistics") { DISTRIBUTED BY HASH(`key1`) BUCKETS 2 PROPERTIES ("replication_num" = "1"); """ - createMV("create materialized view mv1 as select key1,value1,value2 from change;") - sql """insert into change values (1, 2, 3, 4, 5), (1, 2, 3, 4, 5), (10, 20, 30, 40, 50), (10, 20, 30, 40, 50), (100, 200, 300, 400, 500), (1001, 2001, 3001, 4001, 5001);""" - + sql """analyze table change with sync;""" def result = sql """show column stats change""" assertEquals(8, result.size()) @@ -100,10 +98,6 @@ suite("test_schema_change_statistics") { result = sql """show column cached stats change""" assertEquals(8, result.size()) - sql """ALTER TABLE change DROP COLUMN mv_value1 from mv1;""" - wait_schema_change_finished() - stats_dropped("change") - sql """analyze table change with sync;""" result = sql """show column stats change""" assertEquals(7, result.size()) From 9503249130952d775f308865a5ef8c71225e7503 Mon Sep 17 00:00:00 2001 From: shuke987 Date: Mon, 6 Jan 2025 11:16:31 +0800 Subject: [PATCH 2/4] 1 --- .../suites/unique_with_mow_c_p0/test_schema_change_ck.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy b/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy index fb59aabf05dcd1..d0655f7825c6cb 100644 --- a/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy +++ b/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy @@ -117,13 +117,13 @@ suite("test_schema_change_ck") { /****** drop key column ******/ test { sql """ alter table ${tableName} drop column k2; """ - exception "Can not drop key column in Unique data model table" + exception "Can not drop key column k2 in unique data model table" } /****** TODO does not support drop cluster key ******/ test { sql """ alter table ${tableName} drop column c3; """ - exception "Can not drop cluster key column in Unique data model table" + exception "Can not drop key column c3 in unique data model table" } /****** reorder ******/ From 5db2312932a082f6b9147363892bb0eb7e77d7c5 Mon Sep 17 00:00:00 2001 From: shuke987 Date: Mon, 6 Jan 2025 14:45:42 +0800 Subject: [PATCH 3/4] 2 --- .../suites/unique_with_mow_c_p0/test_schema_change_ck.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy b/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy index d0655f7825c6cb..fa7ca91d88aa37 100644 --- a/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy +++ b/regression-test/suites/unique_with_mow_c_p0/test_schema_change_ck.groovy @@ -123,7 +123,7 @@ suite("test_schema_change_ck") { /****** TODO does not support drop cluster key ******/ test { sql """ alter table ${tableName} drop column c3; """ - exception "Can not drop key column c3 in unique data model table" + exception "Can not drop cluster key column in Unique data model table" } /****** reorder ******/ From c85a719d98ed548568cff2ac37b588a096a812b1 Mon Sep 17 00:00:00 2001 From: shuke987 Date: Mon, 6 Jan 2025 14:47:03 +0800 Subject: [PATCH 4/4] 4 --- .../suites/statistics/test_schema_change_statistics.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/regression-test/suites/statistics/test_schema_change_statistics.groovy b/regression-test/suites/statistics/test_schema_change_statistics.groovy index 0c16a5a5bd2cb6..48c1ff372ed5bc 100644 --- a/regression-test/suites/statistics/test_schema_change_statistics.groovy +++ b/regression-test/suites/statistics/test_schema_change_statistics.groovy @@ -73,7 +73,9 @@ suite("test_schema_change_statistics") { DISTRIBUTED BY HASH(`key1`) BUCKETS 2 PROPERTIES ("replication_num" = "1"); """ - + createMV("create materialized view mv1 as select key1,value1,value2 from change;") + sql """insert into change values (1, 2, 3, 4, 5), (1, 2, 3, 4, 5), (10, 20, 30, 40, 50), (10, 20, 30, 40, 50), (100, 200, 300, 400, 500), (1001, 2001, 3001, 4001, 5001);""" + sql """analyze table change with sync;""" def result = sql """show column stats change""" assertEquals(8, result.size())