You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by pa...@apache.org on 2023/04/06 10:42:56 UTC

[doris] branch fix_0406 created (now bf06517cbd)

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

panxiaolei pushed a change to branch fix_0406
in repository https://gitbox.apache.org/repos/asf/doris.git


      at bf06517cbd fix mv match failed when aggregate function not materialized

This branch includes the following new commits:

     new bf06517cbd fix mv match failed when aggregate function not materialized

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


[doris] 01/01: fix mv match failed when aggregate function not materialized

Posted by pa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bf06517cbd77f4f6cbcd9047542cbe82ef621aba
Author: BiteTheDDDDt <px...@qq.com>
AuthorDate: Thu Apr 6 18:42:39 2023 +0800

    fix mv match failed when aggregate function not materialized
---
 .../java/org/apache/doris/planner/MaterializedViewSelector.java  | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/MaterializedViewSelector.java b/fe/fe-core/src/main/java/org/apache/doris/planner/MaterializedViewSelector.java
index a3e7f2b0f8..94ce9e1b53 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/MaterializedViewSelector.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/MaterializedViewSelector.java
@@ -43,6 +43,7 @@ import com.google.common.collect.Sets;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
@@ -455,6 +456,14 @@ public class MaterializedViewSelector {
                 aggExpr.getTableIdToColumnNames(tableIdToAggColumnNames);
                 // count(*): tableIdToAggColumnNames is empty which must forbidden the SPJG MV.
                 // TODO(ml): support count(*)
+                List<SlotRef> slots = new ArrayList<>();
+                aggExpr.collect(SlotRef.class, slots);
+                if (!slots.isEmpty()) {
+                    SlotDescriptor desc = ((SlotRef) slots.get(0)).getDesc();
+                    if (desc != null && !desc.isMaterialized()) {
+                        continue;
+                    }
+                }
                 if (tableIdToAggColumnNames.size() != 1) {
                     reasonOfDisable = "aggExpr[" + aggExpr.debugString() + "] should involved only one column";
                     disableSPJGView = true;


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