seawinde commented on code in PR #59594:
URL: https://github.com/apache/doris/pull/59594#discussion_r2664804499


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/AbstractMaterializedViewRule.java:
##########
@@ -371,7 +373,7 @@ protected List<Plan> doRewrite(StructInfo queryStructInfo, 
CascadesContext casca
                     return rewriteResults;
                 }
                 boolean partitionNeedUnion = 
PartitionCompensator.needUnionRewrite(invalidPartitions, cascadesContext);
-                boolean canUnionRewrite = canUnionRewrite(queryPlan,
+                canUnionRewrite = canUnionRewrite && canUnionRewrite(queryPlan,

Review Comment:
   The current behavior is: when enable_materialized_view_union_rewrite = 
false, the system does not actively compensate for UNION ALL, and the rewrite 
succeeds. When enable_materialized_view_union_rewrite = true, but UNION ALL 
compensation fails, the rewrite will fail. I understand your requirement is 
that when enable_materialized_view_union_rewrite = false, the rewrite should 
also fail, is that correct? In what business scenarios would this be used?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to