liuzqt commented on code in PR #49715: URL: https://github.com/apache/spark/pull/49715#discussion_r1941780439
########## sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala: ########## @@ -545,6 +538,66 @@ case class AdaptiveSparkPlanExec( this.inputPlan == obj.asInstanceOf[AdaptiveSparkPlanExec].inputPlan } + /** + * This method is a wrapper of `createQueryStagesInternal`, which deals with result stage creation + */ + private def createQueryStages( + resultHandler: SparkPlan => Any, + plan: SparkPlan, + firstRun: Boolean): CreateStageResult = { + plan match { + case resultStage@ResultQueryStageExec(_, optimizedPlan, _) => Review Comment: when `withFinalPlanUpdate` is invoked multiple times, e.g., when we do `df.collect` multiple times. -- 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