Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22630#discussion_r223182600
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
 ---
    @@ -452,46 +452,68 @@ case class RangeExec(range: 
org.apache.spark.sql.catalyst.plans.logical.Range)
     
         val localIdx = ctx.freshName("localIdx")
         val localEnd = ctx.freshName("localEnd")
    -    val range = ctx.freshName("range")
         val shouldStop = if (parent.needStopCheck) {
    -      s"if (shouldStop()) { $number = $value + ${step}L; return; }"
    +      s"if (shouldStop()) { $nextIndex = $value + ${step}L; return; }"
    --- End diff --
    
    `shouldStop` is called local, but metrics updating is not.
    
    Anyway, JVM JIT is mysterious and we need to be super careful when updating 
this kind of hot loops. That said, I'm not confident of any changes to the hot 
loop without a benchmark.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to