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

    https://github.com/apache/spark/pull/776#discussion_r13269334
  
    --- Diff: 
core/src/main/scala/org/apache/spark/rdd/ParallelCollectionRDD.scala ---
    @@ -117,6 +117,15 @@ private object ParallelCollectionRDD {
         if (numSlices < 1) {
           throw new IllegalArgumentException("Positive number of slices 
required")
         }
    +    // Sequences need to be sliced at same positions for operations
    +    // like RDD.zip() to behave as expected
    +    def positions(length: Long, numSlices: Int) = {
    --- End diff --
    
    Actually it would be better if this returned an Iterator, so that it 
doesn't materialize the whole sequence. You can do `(0 until 
numSlices).iterator.map(...)`.


---
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