From 669dc1887e54c585ca1bbaa770711491da988150 Mon Sep 17 00:00:00 2001 From: Uniqueyou Date: Fri, 29 Aug 2025 17:27:06 +0800 Subject: [PATCH] [fix](test) Failed to show create table for async mv (#55278) now: ``` CREATE TABLE t ( id int, test int, `k` int ) DUPLICATE KEY(`id`) PARTITION BY range(`id`) ( partition p1 values less than (5), partition p2 values less than (10) ) DISTRIBUTED BY HASH(`id`) BUCKETS 1 PROPERTIES ( "replication_num" = "1" ); insert into t values (1,1,1); insert into t values (1,2,1); insert into t values (1,3,1); CREATE MATERIALIZED VIEW mv BUILD IMMEDIATE REFRESH AUTO PROPERTIES ('replication_num' = '1') AS (select test, id from t); ``` ``` 2025-08-26 10:09:31.355 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: show databases 2025-08-26 10:09:31.360 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: show tables from db 2025-08-26 10:09:31.362 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: show create table db.mv 2025-08-26 10:09:31.374 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: show create materialized view db.mv 2025-08-26 10:09:31.378 INFO [suite-thread-1] (check_meta.groovy:51) - select count database: db, table mv 2025-08-26 10:09:31.380 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: select /*+ SET_VAR(enable_push_down_no_group_agg=false) */ count(*) from db.`mv` 2025-08-26 10:09:31.407 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: select /*+ SET_VAR(enable_push_down_no_group_agg=false) */ count(*) from db.`mv` 2025-08-26 10:09:31.432 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: select /*+ SET_VAR(enable_push_down_no_group_agg=false) */ count(*) from db.`mv` 2025-08-26 10:09:31.457 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: select /*+ SET_VAR(enable_push_down_no_group_agg=false) */ count(*) from db.`mv` 2025-08-26 10:09:31.482 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: select /*+ SET_VAR(enable_push_down_no_group_agg=false) */ count(*) from db.`mv` 2025-08-26 10:09:31.508 INFO [suite-thread-1] (Suite.groovy:414) - Execute sql: select /*+ SET_VAR(enable_push_down_no_group_agg=false) */ count(*) from db.`mv` ``` --- .../suites/data_reliability/check_meta.groovy | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/regression-test/suites/data_reliability/check_meta.groovy b/regression-test/suites/data_reliability/check_meta.groovy index 50e887c3e9b51d..2f788ae140db33 100644 --- a/regression-test/suites/data_reliability/check_meta.groovy +++ b/regression-test/suites/data_reliability/check_meta.groovy @@ -28,7 +28,23 @@ suite("check_meta", "data_reliability,p3") { List> tableRes = sql """ show tables from ${db} """ for (tableRow : tableRes) { def table = tableRow[0] - def createTableSql = sql """ show create table ${db}.`${table}` """ + def createTableSql + try { + createTableSql = sql "show create table ${db}.${table}" + } catch (Exception e) { + if (e.getMessage().contains("not support async materialized view")) { + try { + createTableSql = sql "show create materialized view ${db}.${table}" + } catch (Exception e2) { + if (e2.getMessage().contains("table not found")) { + continue + } + } + } else { + logger.warn("Failed to show create materialized view ${db}.${table}: ${e.getMessage()}") + continue + } + } if (createTableSql[0][1].contains("CREATE VIEW")) { continue }