srowen commented on a change in pull request #28971:
URL: https://github.com/apache/spark/pull/28971#discussion_r448713671



##########
File path: core/src/main/scala/org/apache/spark/rdd/ParallelCollectionRDD.scala
##########
@@ -135,10 +135,10 @@ private object ParallelCollectionRDD {
             new Range.Inclusive(r.start + start * r.step, r.end, r.step)
           }
           else {
-            new Range(r.start + start * r.step, r.start + end * r.step, r.step)
+            new Range.Inclusive(r.start + start * r.step, r.start + end * 
r.step - 1, r.step)

Review comment:
       Range.Exclusive doesn't exist in 2.12, and Range() (exclusive in 2.12) 
doesn't exist in 2.13. :( I tried that initially. Because these are integers, I 
think we can get away with an Inclusive range that ends at end - 1 instead.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to