cloud-fan commented on code in PR #52584:
URL: https://github.com/apache/spark/pull/52584#discussion_r2441550259


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala:
##########
@@ -971,7 +971,10 @@ case class CollapseCodegenStages(
         // The whole-stage-codegen framework is row-based. If a plan supports 
columnar execution,
         // it can't support whole-stage-codegen at the same time.
         assert(!plan.supportsColumnar)
-        
WholeStageCodegenExec(insertInputAdapter(plan))(codegenStageCounter.incrementAndGet())
+        val newId = codegenStageCounter.incrementAndGet()
+        val newPlan = WholeStageCodegenExec(insertInputAdapter(plan))(newId)
+        plan.logicalLink.foreach(newPlan.setLogicalLink)

Review Comment:
   let's revert it to be safe, the logical plan is quite sensitive to AQE. And 
technically, the `CollapseCodegenStages` is newly generated at planning phase, 
it does have have a corresponding logical plan.



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