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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/Validator.java:
##########
@@ -62,7 +62,9 @@ public Plan visitPhysicalFilter(PhysicalFilter<? extends 
Plan> filter, CascadesC
         Plan child = filter.child();
         // Forbidden filter-project, we must make filter-project -> 
project-filter.
         // except that the project contains NoneMovableFunction
-        if (child instanceof PhysicalProject && !((PhysicalProject<?>) 
child).containsNoneMovableFunction()) {
+        if (child instanceof PhysicalProject && !((PhysicalProject<?>) 
child).containsNoneMovableFunction()
+                && filter.getInputSlots().stream().map(((PhysicalProject<?>) 
child).getAliasToProducer()::get)
+                        .noneMatch(expr -> expr != null && 
expr.containsNonfoldable())) {
             throw new AnalysisException(
                     "Nereids generate a filter-project plan, but backend not 
support:\n" + filter.treeString());
         }

Review Comment:
   i think we could remove this if statement directly, because we have 
processed filter-project in translator



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