From d720563861cdb2d78858a7c86a1d415af37f4089 Mon Sep 17 00:00:00 2001 From: seawinde Date: Mon, 21 Oct 2024 20:04:03 +0800 Subject: [PATCH] add common method --- .../groovy/org/apache/doris/regression/suite/Suite.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy index 97bdad8d685dae9..e29f71eff3e997e 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy @@ -1484,6 +1484,13 @@ class Suite implements GroovyInterceptable { } } + def mv_rewrite_success = { query_sql, mv_name -> + explain { + sql("${query_sql}") + contains("${mv_name}(${mv_name})") + } + } + def check_mv_rewrite_fail = { db, mv_sql, query_sql, mv_name -> sql """DROP MATERIALIZED VIEW IF EXISTS ${mv_name}"""