Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/2093#discussion_r16633870
--- Diff: python/pyspark/rdd.py ---
@@ -746,18 +678,23 @@ def reduce(self, f):
15
>>> sc.parallelize((2 for _ in range(10))).map(lambda x:
1).cache().reduce(add)
10
+ >>> sc.parallelize([]).reduce(add)
+ Traceback (most recent call last):
+ ...
+ ValueError: Can not reduce() of empty RDD
--- End diff --
Minor nit, but I'd drop the 'of' and just say "Cannot reduce() empty RDD"
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]