morrySnow commented on code in PR #37909:
URL: https://github.com/apache/doris/pull/37909#discussion_r1679087894


##########
regression-test/suites/demo_p0/explain_action.groovy:
##########
@@ -51,4 +51,66 @@ suite("explain_action") {
             assertTrue(exception != null)
         }
     }
+
+    def dbName = "regression_test_demo_p0"
+    def tbName = "tb_base"
+    def tbMvName = "${tbName}_mv"
+    sql """
+            set experimental_enable_nereids_planner=true;
+        """
+    sql """
+            drop database if exists ${dbName};
+        """
+    sql """
+            create database  ${dbName};
+        """
+    sql """ CREATE TABLE ${dbName}.${tbName} (
+                k0 BOOLEAN NOT NULL, 
+                k1 TINYINT NOT NULL, 
+                k2 SMALLINT NOT NULL, 
+                k3 INT NOT NULL, 
+                k4 BIGINT NOT NULL, 
+                k5 LARGEINT NOT NULL, 
+                k6 DECIMALV3(9, 3) NOT NULL, 
+                k7 CHAR(5) NOT NULL, 
+                k8 DATE NOT NULL, 
+                k9 DATETIME NOT NULL, 
+                k10 VARCHAR(20) NOT NULL, 
+                k11 DOUBLE NOT NULL, 
+                k12 FLOAT NOT NULL
+                ) PARTITION BY RANGE(k1) (
+                PARTITION p1 
+                VALUES 
+                    LESS THAN ("-10"), 
+                    PARTITION p2 
+                VALUES 
+                    LESS THAN ("0"), 
+                    PARTITION p3 
+                VALUES 
+                    LESS THAN ("10"), 
+                    PARTITION p4 
+                VALUES 
+                    LESS THAN ("20")
+                ) DISTRIBUTED BY HASH(k4, k5) BUCKETS 1;
+        """
+    sql """
+            CREATE MATERIALIZED VIEW ${tbMvName} AS SELECT k0, max(k8), 
min(k11), sum(k12), count(k10), hll_union(hll_hash(k7)), 
bitmap_union(to_bitmap(k2)) from ${dbName}.${tbName} group by k0;
+        """
+    sql """
+            insert into ${dbName}.${tbName} 
values(1,2,3,4,5,6,7,"8","2020-10-01","2020-10-10","10",12,13);
+        """
+    def count = 10;
+    while (true) {
+        def result = sql "desc ${dbName}.${tbName} all;"
+        if (result.toString().containsIgnoreCase("${tbMvName}")) {
+            break;
+        } else {
+            sleep 1000
+            count++
+        }

Review Comment:
   do we have better way to check mv is ready for query? @starocean999 



##########
regression-test/suites/demo_p0/explain_action.groovy:
##########
@@ -51,4 +51,66 @@ suite("explain_action") {
             assertTrue(exception != null)
         }
     }
+
+    def dbName = "regression_test_demo_p0"
+    def tbName = "tb_base"
+    def tbMvName = "${tbName}_mv"
+    sql """
+            set experimental_enable_nereids_planner=true;
+        """

Review Comment:
   remove this, case do not need use nereids explicity any more.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to