morrySnow commented on code in PR #37934:
URL: https://github.com/apache/doris/pull/37934#discussion_r2234574650


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckPolicy.java:
##########
@@ -68,11 +71,12 @@ public List<Rule> buildRules() {
                                 upAgg = child;
                                 child = child.child(0);
                             }
-                            if (!(child instanceof LogicalRelation)
+                            if (!(child instanceof LogicalRelation || 
isView(child))
                                     || 
ctx.connectContext.getSessionVariable().isPlayNereidsDump()) {
                                 return ctx.root.child();
                             }
-                            LogicalRelation relation = (LogicalRelation) child;
+                            LogicalPlan relation = child instanceof 
LogicalSubQueryAlias ? (LogicalPlan) child.child(0)

Review Comment:
   add comment to explain why plan is SubQueryAlias -- View



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