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

    https://github.com/apache/spark/pull/760#discussion_r12619379
  
    --- Diff: 
core/src/main/scala/org/apache/spark/rdd/ParallelCollectionRDD.scala ---
    @@ -137,9 +137,11 @@ private object ParallelCollectionRDD {
           case nr: NumericRange[_] => {
             // For ranges of Long, Double, BigInteger, etc
             val slices = new ArrayBuffer[Seq[T]](numSlices)
    -        val sliceSize = (nr.size + numSlices - 1) / numSlices // Round up 
to catch everything
             var r = nr
             for (i <- 0 until numSlices) {
    +          val start = ((i * nr.length.toLong) / numSlices).toInt
    --- End diff --
    
    We should probably add a comment above this to say that the goal is to make 
it slice at the exact same positions as other sequences.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to