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

morrysnow 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 582ad779609 [fix](Nereids) rewritten mv should check output set and 
should not return null (#34288)
582ad779609 is described below

commit 582ad779609a564dbe335daafa043cf6c91f518b
Author: morrySnow <101034200+morrys...@users.noreply.github.com>
AuthorDate: Mon Apr 29 19:33:48 2024 +0800

    [fix](Nereids) rewritten mv should check output set and should not return 
null (#34288)
    
    1. we should check output set, since we will remove top project and
       result output size will diff with its child output size if there are
       dup slot in result list
    2. should not return null, instead we should return rewritten plan
       itself, because we will use return result in many place and do not
       check null at all
---
 .../doris/nereids/rules/exploration/mv/MaterializedViewUtils.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java
index eb7d07c2310..6863a7e01b1 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java
@@ -203,9 +203,8 @@ public class MaterializedViewUtils {
             CascadesContext cascadesContext,
             Function<CascadesContext, Plan> planRewriter,
             Plan rewrittenPlan, Plan originPlan) {
-        List<Slot> originOutputs = originPlan.getOutput();
-        if (originOutputs.size() != rewrittenPlan.getOutput().size()) {
-            return null;
+        if (originPlan.getOutputSet().size() != 
rewrittenPlan.getOutputSet().size()) {
+            return rewrittenPlan;
         }
         // After RBO, slot order may change, so need 
originSlotToRewrittenExprId which record
         // origin plan slot order


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

Reply via email to