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

    https://github.com/apache/spark/pull/20844#discussion_r175884882
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
 ---
    @@ -396,9 +396,11 @@ case class RangeExec(range: 
org.apache.spark.sql.catalyst.plans.logical.Range)
         // The default size of a batch, which must be positive integer
         val batchSize = 1000
     
    -    val initRangeFuncName = ctx.addNewFunction("initRange",
    +    val initRange = ctx.freshName("initRange")
    +
    +    val initRangeFuncName = ctx.addNewFunction(initRange,
           s"""
    -        | private void initRange(int idx) {
    +        | private void ${initRange}(int idx) {
    --- End diff --
    
    I think you can apply https://github.com/apache/spark/pull/20726 to the 
`RangeExec` operator and fix this.


---

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

Reply via email to