[
https://issues.apache.org/jira/browse/SPARK-4304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14203092#comment-14203092
]
Apache Spark commented on SPARK-4304:
-------------------------------------
User 'davies' has created a pull request for this issue:
https://github.com/apache/spark/pull/3162
> sortByKey() will fail on empty RDD
> ----------------------------------
>
> Key: SPARK-4304
> URL: https://issues.apache.org/jira/browse/SPARK-4304
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 1.0.2, 1.1.0, 1.2.0
> Reporter: Davies Liu
> Priority: Blocker
>
> {code}
> >>> sc.parallelize(zip(range(4), range(0)), 5).sortByKey().count()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/Users/davies/work/spark/python/pyspark/rdd.py", line 532, in
> sortByKey
> for i in range(0, numPartitions - 1)]
> IndexError: list index out of range
> >>>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]