ulysses-you commented on code in PR #49715: URL: https://github.com/apache/spark/pull/49715#discussion_r1942143471
########## sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala: ########## @@ -588,7 +639,7 @@ case class AdaptiveSparkPlanExec( if (plan.children.isEmpty) { CreateStageResult(newPlan = plan, allChildStagesMaterialized = true, newStages = Seq.empty) } else { - val results = plan.children.map(createQueryStages) + val results = plan.children.map(createQueryStagesInternal) CreateStageResult( newPlan = plan.withNewChildren(results.map(_.newPlan)), allChildStagesMaterialized = results.forall(_.allChildStagesMaterialized), Review Comment: It seems the new code is a bit hard to read. Not sure if there are some developing context. Can we create result query stage here ? If the plan is root query and `allChildStagesMaterialized` then we wrap `ResultQueryStage` and it is not a materialized stage, so aqe will materialize it. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org