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 808c07fa68d8ad33e23a7e8aa36c42304f294427 Author: AKIRA <33112463+kikyou1...@users.noreply.github.com> AuthorDate: Tue Oct 17 15:06:01 2023 +0800 [fix](case) Fix test_analyze case (#25476) It has following problems before this PR use count(*) to check if all column analyzed return directly when fe count > 1 Co-authored-by: AKIHA <cyborgz1...@example.com> --- .../suites/statistics/analyze_stats.groovy | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/regression-test/suites/statistics/analyze_stats.groovy b/regression-test/suites/statistics/analyze_stats.groovy index 04bd9c730d4..5f6735c7fb2 100644 --- a/regression-test/suites/statistics/analyze_stats.groovy +++ b/regression-test/suites/statistics/analyze_stats.groovy @@ -18,7 +18,9 @@ import java.util.stream.Collectors // under the License. suite("test_analyze") { - String db = "regression_test_statistics" + + String db = "test_analyze" + String tbl = "analyzetestlimited_duplicate_all" sql """ @@ -39,6 +41,7 @@ suite("test_analyze") { DROP TABLE IF EXISTS `${tbl}` """ + sql """ CREATE TABLE IF NOT EXISTS `${tbl}` ( `analyzetestlimitedk3` int(11) null comment "", @@ -86,12 +89,6 @@ suite("test_analyze") { 'ps7qwcZjBjkGfcXYMw5HQMwnElzoHqinwk8vhQCbVoGBgfotc4oSkpD3tP34h4h0tTogDMwFu60iJm1bofUzyUQofTeRwZk8','4692206687866847780') """ - def frontends = sql """ - SHOW FRONTENDS; - """ - if (frontends.size > 1) { - return; - } sql """ ANALYZE DATABASE ${db} """ @@ -240,8 +237,8 @@ suite("test_analyze") { SHOW COLUMN CACHED STATS analyze_partitioned_tbl_test(col1) """ - def expected_result = { r -> - for (int i = 0; i < r.size; i++) { + def expected_result = { r-> + for(int i = 0; i < r.size; i++) { if ((int) Double.parseDouble(r[i][1]) == 6) { return true } else { @@ -867,7 +864,7 @@ PARTITION `p598` VALUES IN (598), PARTITION `p599` VALUES IN (599) ) - DISTRIBUTED BY HASH(`id`) BUCKETS 16 + DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_num" = "1" @@ -878,7 +875,6 @@ PARTITION `p599` VALUES IN (599) sql """ INSERT INTO test_600_partition_table_analyze VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26),(27),(28),(29),(30),(31),(32),(33),(34),(35),(36),(37),(38),(39),(40),(41),(42),(43),(44),(45),(46),(47),(48),(49),(50),(51),(52),(53),(54),(55),(56),(57),(58),(59),(60),(61),(62),(63),(64),(65),(66),(67),(68),(69),(70),(71),(72),(73),(74),(75),(76),(77),(78),(79),(80),(81),(82),(83),(84),(85),(86),(87),(8 [...] """ - sql """ INSERT INTO test_600_partition_table_analyze VALUES (301),(302),(303),(304),(305),(306),(307),(308),(309),(310),(311),(312),(313),(314),(315),(316),(317),(318),(319),(320),(321),(322),(323),(324),(325),(326),(327),(328),(329),(330),(331),(332),(333),(334),(335),(336),(337),(338),(339),(340),(341),(342),(343),(344),(345),(346),(347),(348),(349),(350),(351),(352),(353),(354),(355),(356),(357),(358),(359),(360),(361),(362),(363),(364),(365),(366),(367),(368),(369),(370),(371),(372), [...] """ @@ -890,7 +886,7 @@ PARTITION `p599` VALUES IN (599) SHOW COLUMN CACHED STATS test_600_partition_table_analyze(id); """ - def expected_col_stats = { r, expected_value, idx -> + def expected_col_stats = { r, expected_value, idx -> return (int) Double.parseDouble(r[0][idx]) == expected_value } @@ -1050,6 +1046,7 @@ PARTITION `p599` VALUES IN (599) sql """ DROP TABLE IF EXISTS two_thousand_partition_table_test """ + // check analyze table with thousand partition sql """ CREATE TABLE two_thousand_partition_table_test (col1 int(11451) not null) @@ -1059,7 +1056,7 @@ PARTITION `p599` VALUES IN (599) from (0) to (1000001) INTERVAL 500 ) DISTRIBUTED BY HASH(col1) - BUCKETS 3 + BUCKETS 1 PROPERTIES( "replication_num"="1" ); @@ -1113,5 +1110,4 @@ PARTITION `p599` VALUES IN (599) sql """ANALYZE TABLE test_meta_management WITH SYNC""" afterDropped = sql """SHOW TABLE STATS test_meta_management""" assert check_column(afterDropped, "[col1, col2, col3]") - } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org