Kikyou1997 commented on code in PR #11842:
URL: https://github.com/apache/doris/pull/11842#discussion_r956609518


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -125,10 +126,12 @@ public PlanFragment translatePlan(PhysicalPlan 
physicalPlan, PlanTranslatorConte
         // TODO: trick here, we need push project down
         if (physicalPlan.getType() == PlanType.PHYSICAL_PROJECT) {
             PhysicalProject<Plan> physicalProject = (PhysicalProject<Plan>) 
physicalPlan;
-            List<Expr> outputExprs = physicalProject.getProjects().stream()
-                    .map(e -> ExpressionTranslator.translate(e, context))
-                    .collect(Collectors.toList());
-            rootFragment.setOutputExprs(outputExprs);
+            rootFragment.setOutputExprs(
+                    physicalProject
+                            .getOutput()
+                            .stream()
+                            .map(s -> ExpressionTranslator.translate(s, 
context))
+                            .collect(Collectors.toList()));

Review Comment:
   `outputExprs` is  only set on the root fragment only, it's not needed by 
every fragment



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