Github user rednaxelafx commented on the issue: https://github.com/apache/spark/pull/20224 One comment as to using `ThreadLocal[Integer]` for keeping track of the IDs: I did have an alternative implementation of this PR that declares `WholeStageCodegenExec` as: ```scala case class WholeStageCodegenExec(child: SparkPlan)(private val codegenStageId: Int) extends UnaryExecNode with CodegenSupport ``` and then explicitly thread the `codegenStageId` recursively in `CollapseCodegenStages.insertWholeStageCodegen()`, so that the relationship between the auto-increment of IDs and the insertion order of `WholeStageCodegenExec`s are explicit. However that turned out to be much more complicated than just using a `ThreadLocal[Integer]` and implicitly threading the IDs. So in the end I opted for the thread-local counter version instead.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org