yujun777 commented on code in PR #65472:
URL: https://github.com/apache/doris/pull/65472#discussion_r3575946378


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PullUpJoinFromUnionAll.java:
##########
@@ -577,14 +577,14 @@ boolean isNotSupported(Plan plan) {
         }
 
         boolean comparePlan(Plan plan1, Plan plan2) {
+            if (plan1.getOutput().size() != plan2.getOutput().size()) {

Review Comment:
   Fixed in the latest update.
   
   The comparator no longer relies on output arity or table identity for 
catalog relations. It now delegates to 
`LogicalCatalogRelation.hasSameScanSemantics()`, which first requires the same 
relation type, same table identity, and semantically aligned output slots, then 
lets each scan override its own state comparison.
   
   For `LogicalOlapScan`, the comparison now includes selected index, 
selected/manual partitions, selected/manual tablets, `tableSample`, and 
`scanParams`. `LogicalOlapTableStreamScan` also extends that with `readMode`. 
`LogicalFileScan` now compares snapshot and scan params as well, and other 
catalog relations either provide their own state comparison or stay 
conservative.
   
   I also kept FE UT coverage for selected-index, partition/tablet scope, 
stream mode, table sample, and scan-params mismatches in 
`PullUpJoinFromUnionAllTest`.



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