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

    https://github.com/apache/spark/pull/22524#discussion_r219690413
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
 ---
    @@ -465,13 +465,18 @@ case class RangeExec(range: 
org.apache.spark.sql.catalyst.plans.logical.Range)
           |   $initRangeFuncName(partitionIndex);
           | }
           |
    -      | while (true) {
    +      | while (true && !stopEarly()) {
           |   long $range = $batchEnd - $number;
           |   if ($range != 0L) {
           |     int $localEnd = (int)($range / ${step}L);
           |     for (int $localIdx = 0; $localIdx < $localEnd; $localIdx++) {
           |       long $value = ((long)$localIdx * ${step}L) + $number;
    +      |       $numOutput.add(1);
    --- End diff --
    
    I have no worry about it since it is a simple op.


---

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

Reply via email to