This is an automated email from the ASF dual-hosted git repository.
lijibing pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 4d359cd9464 [improvement](regression)Use createMV to create
materialized view. (#37837) (#37992)
4d359cd9464 is described below
commit 4d359cd9464542f34cd887f3778731ff35acccf1
Author: Jibing-Li <[email protected]>
AuthorDate: Wed Jul 17 17:16:04 2024 +0800
[improvement](regression)Use createMV to create materialized view. (#37837)
(#37992)
backport: https://github.com/apache/doris/pull/37837
---
.../suites/statistics/test_analyze_mv.groovy | 24 ++++++++--------------
.../suites/statistics/test_select_mv.groovy | 9 ++------
2 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy
b/regression-test/suites/statistics/test_analyze_mv.groovy
index 63d7d3ae6de..9128ee2b263 100644
--- a/regression-test/suites/statistics/test_analyze_mv.groovy
+++ b/regression-test/suites/statistics/test_analyze_mv.groovy
@@ -126,12 +126,9 @@ suite("test_analyze_mv") {
"replication_num" = "1"
)
"""
- sql """create materialized view mv1 as select key1 from mvTestDup;"""
- wait_mv_finish("test_analyze_mv", "mvTestDup")
- sql """create materialized view mv2 as select key2 from mvTestDup;"""
- wait_mv_finish("test_analyze_mv", "mvTestDup")
- sql """create materialized view mv3 as select key1, key2, sum(value1),
max(value2), min(value3) from mvTestDup group by key1, key2;"""
- wait_mv_finish("test_analyze_mv", "mvTestDup")
+ createMV("create materialized view mv1 as select key1 from mvTestDup;")
+ createMV("create materialized view mv2 as select key2 from mvTestDup;")
+ createMV("create materialized view mv3 as select key1, key2, sum(value1),
max(value2), min(value3) from mvTestDup group by key1, key2;")
sql """insert into mvTestDup 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 mvTestDup with sync;"""
@@ -236,12 +233,9 @@ suite("test_analyze_mv") {
);
"""
- sql """create materialized view mv1 as select key2 from mvTestAgg;"""
- wait_mv_finish("test_analyze_mv", "mvTestAgg")
- sql """create materialized view mv3 as select key1, key2, sum(value1),
max(value2), min(value3) from mvTestAgg group by key1, key2;"""
- wait_mv_finish("test_analyze_mv", "mvTestAgg")
- sql """create materialized view mv6 as select key1, sum(value1) from
mvTestAgg group by key1;"""
- wait_mv_finish("test_analyze_mv", "mvTestAgg")
+ createMV("create materialized view mv1 as select key2 from mvTestAgg;")
+ createMV("create materialized view mv3 as select key1, key2, sum(value1),
max(value2), min(value3) from mvTestAgg group by key1, key2;")
+ createMV("create materialized view mv6 as select key1, sum(value1) from
mvTestAgg group by key1;")
sql """alter table mvTestAgg ADD ROLLUP rollup1(key1, value1)"""
wait_mv_finish("test_analyze_mv", "mvTestAgg")
sql """insert into mvTestAgg values (1, 2, 3, 4, 5), (1, 2, 3, 4, 5), (1,
11, 22, 33, 44), (10, 20, 30, 40, 50), (10, 20, 30, 40, 50), (100, 200, 300,
400, 500), (1001, 2001, 3001, 4001, 5001);"""
@@ -378,10 +372,8 @@ suite("test_analyze_mv") {
);
"""
- sql """create materialized view mv1 as select key1 from mvTestUni;"""
- wait_mv_finish("test_analyze_mv", "mvTestUni")
- sql """create materialized view mv6 as select key2, value2, value3 from
mvTestUni;"""
- wait_mv_finish("test_analyze_mv", "mvTestUni")
+ createMV("create materialized view mv1 as select key1 from mvTestUni;")
+ createMV("create materialized view mv6 as select key2, value2, value3 from
mvTestUni;")
sql """insert into mvTestUni values (1, 2, 3, 4, 5), (1, 2, 3, 7, 8), (1,
11, 22, 33, 44), (10, 20, 30, 40, 50), (10, 20, 30, 40, 50), (100, 200, 300,
400, 500), (1001, 2001, 3001, 4001, 5001);"""
sql """analyze table mvTestUni with sync;"""
diff --git a/regression-test/suites/statistics/test_select_mv.groovy
b/regression-test/suites/statistics/test_select_mv.groovy
index 8c3417cb4b9..b6a8697fa7f 100644
--- a/regression-test/suites/statistics/test_select_mv.groovy
+++ b/regression-test/suites/statistics/test_select_mv.groovy
@@ -67,9 +67,7 @@ suite("test_select_mv") {
);
"""
- sql """
- create materialized view dup1 as select key2, sum(value) from test_dup
group by key2;
- """
+ createMV("create materialized view dup1 as select key2, sum(value) from
test_dup group by key2;")
sql """CREATE TABLE test_agg (
key1 int NOT NULL,
@@ -83,10 +81,7 @@ suite("test_select_mv") {
);
"""
- sql """
- create materialized view agg1 as select key2, sum(value) from test_agg
group by key2;
- """
- wait_mv_finish("test_select_mv")
+ createMV("create materialized view agg1 as select key2, sum(value) from
test_agg group by key2;")
sql """insert into test_dup values (1, 1, 1), (2, 2, 2)"""
sql """insert into test_dup values (1, 1, 1), (2, 2, 2)"""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]