Github user rednaxelafx commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20224#discussion_r163757952
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
 ---
    @@ -325,6 +326,28 @@ object WholeStageCodegenExec {
       }
     }
     
    +object WholeStageCodegenId {
    +  private val codegenStageCounter = ThreadLocal.withInitial(new 
Supplier[Integer] {
    +    override def get() = 0  // TODO: change to Scala lambda syntax when 
upgraded to Scala 2.12+
    --- End diff --
    
    With the updated PR that uses the secondary constructor in 
`WholeStageCodegenExec`, yes you're making a good point. All the places that 
create temporary `WholeStageCodegenExec` objects are explicitly passing in `0` 
as the codegen stage ID now, so we can indeed simplify the counter logic here.
    
    Will address in the next update.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to