This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 66b14f4db1f [fix](mtmv)fix can not create mtmv all use default value 
(#28922)
66b14f4db1f is described below

commit 66b14f4db1f34371237f45b9bca64fc9ef951cc4
Author: zhangdong <493738...@qq.com>
AuthorDate: Sat Dec 23 21:27:01 2023 +0800

    [fix](mtmv)fix can not create mtmv all use default value (#28922)
---
 .../org/apache/doris/nereids/parser/LogicalPlanBuilder.java |  6 ++++++
 regression-test/suites/mtmv_p0/test_build_mtmv.groovy       | 13 +++++++++++++
 2 files changed, 19 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
index dcbfb9ef3f0..37b42c7123f 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java
@@ -616,6 +616,9 @@ public class LogicalPlanBuilder extends 
DorisParserBaseVisitor<Object> {
 
     @Override
     public MTMVRefreshTriggerInfo visitRefreshTrigger(RefreshTriggerContext 
ctx) {
+        if (ctx == null) {
+            return new MTMVRefreshTriggerInfo(RefreshTrigger.MANUAL);
+        }
         if (ctx.MANUAL() != null) {
             return new MTMVRefreshTriggerInfo(RefreshTrigger.MANUAL);
         }
@@ -662,6 +665,9 @@ public class LogicalPlanBuilder extends 
DorisParserBaseVisitor<Object> {
 
     @Override
     public BuildMode visitBuildMode(BuildModeContext ctx) {
+        if (ctx == null) {
+            return BuildMode.IMMEDIATE;
+        }
         if (ctx.DEFERRED() != null) {
             return BuildMode.DEFERRED;
         } else if (ctx.IMMEDIATE() != null) {
diff --git a/regression-test/suites/mtmv_p0/test_build_mtmv.groovy 
b/regression-test/suites/mtmv_p0/test_build_mtmv.groovy
index 882a7eff22e..eb4560f8b06 100644
--- a/regression-test/suites/mtmv_p0/test_build_mtmv.groovy
+++ b/regression-test/suites/mtmv_p0/test_build_mtmv.groovy
@@ -152,6 +152,19 @@ suite("test_build_mtmv") {
         DROP MATERIALIZED VIEW ${mvName}
     """
 
+    // use default value
+    sql """
+            CREATE MATERIALIZED VIEW ${mvName}
+            DISTRIBUTED BY RANDOM BUCKETS 2
+            PROPERTIES ('replication_num' = '1')
+            AS
+            SELECT ${tableName}.username, ${tableNamePv}.pv FROM ${tableName}, 
${tableNamePv} WHERE ${tableName}.id=${tableNamePv}.id;
+        """
+
+    sql """
+            DROP MATERIALIZED VIEW ${mvName}
+        """
+
     // IMMEDIATE schedule interval
     sql """
         CREATE MATERIALIZED VIEW ${mvName}


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

Reply via email to