github-actions[bot] commented on code in PR #63899:
URL: https://github.com/apache/doris/pull/63899#discussion_r3703148979


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/PartitionIncrementMaintainer.java:
##########
@@ -172,7 +174,7 @@ public Void visitLogicalUnion(LogicalUnion union, 
PartitionIncrementCheckContext
                 context.collectFailedTableSet(union);
                 context.addFailReason("not union all output pass partition 
increment check");
             }
-            return super.visit(union, context);
+            return null;

Review Comment:
   [P1] Preserve failed child state when stopping UNION traversal
   
   This early return drops failures that exist only in a union child's isolated 
context. For example, consider the reduced rewritten tree:
   
   ```text
   UnionAll(p)
     Project(l.shipdate AS p)
       InnerJoin
         Relation lineitem l
         LogicalIntersect(unrelated_a, unrelated_b)
     Project(o.orderdate AS p)
       Relation orders
   ```
   
   DFS can first mark `l.shipdate` as reached/from a partition column, then the 
unsupported `LogicalIntersect` sets that child context's `failFast`. The merge 
above checks only the reached/from-partition flags, not 
`childContext.isFailFast()` or its failure state, so it still accepts and 
merges the child. Previously `super.visit(union, context)` revisited the 
unsupported node in the parent context, causing `MaterializedViewUtils` to 
reject it; returning here can instead report partition-increment maintenance as 
possible for an unsupported branch. Please reject/propagate failed child 
contexts before merging (or keep equivalent parent validation), and add a 
negative mixed-state union test.
   



-- 
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