Skip to content

Commit

Permalink
[Test](check) add check for materialized view (#46713)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyxxxcat authored Jan 12, 2025
1 parent 5a34929 commit 4f68b81
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions regression-test/suites/check_before_quit/check_before_quit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,21 @@ suite("check_before_quit", "nonConcurrent,p0") {
logger.info("show all tabkes: ${allTables}")
for (int j = 0;j < allTables.size();j ++) {
def tbl = allTables[j][0]
def createTableSql = sql "show create table ${db}.${tbl}"
def createTableSql = ""
try {
createTableSql = sql "show create table ${db}.${tbl}"
logger.info("create table sql: ${createTableSql}")
} catch (Exception e) {
if (e.getMessage().contains("not support async materialized view")) {
createTableSql = sql "show create materialized view ${tbl}"
logger.info("create materialized view sql: ${createTableSql}")
}
}
if (createTableSql[0][1].contains("CREATE VIEW")) {
sql "drop view if exists ${tbl}"
}else {
} else if (createTableSql[0][1].contains("CREATE MATERIALIZED VIEW")) {
sql "drop materialized view if exists ${tbl}"
} else {
sql "drop table if exists ${tbl}"
}
sql(createTableSql[0][1])
Expand Down

0 comments on commit 4f68b81

Please sign in to comment.