Repository: spark Updated Branches: refs/heads/master c00744e60 -> d8c4b00a2
[SPARK-7683][PYSPARK] Confusing behavior of fold function of RDD in pyspark Fix order of arguments that Pyspark RDD.fold passes to its op - should be (acc, obj) like other implementations. Obviously, this is a potentially breaking change, so can only happen for 2.x CC davies Author: Sean Owen <so...@cloudera.com> Closes #10771 from srowen/SPARK-7683. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d8c4b00a Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d8c4b00a Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d8c4b00a Branch: refs/heads/master Commit: d8c4b00a234514cc3a877e3daed5d1378a2637e8 Parents: c00744e Author: Sean Owen <so...@cloudera.com> Authored: Tue Jan 19 09:34:49 2016 +0000 Committer: Sean Owen <so...@cloudera.com> Committed: Tue Jan 19 09:34:49 2016 +0000 ---------------------------------------------------------------------- python/pyspark/rdd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/d8c4b00a/python/pyspark/rdd.py ---------------------------------------------------------------------- diff --git a/python/pyspark/rdd.py b/python/pyspark/rdd.py index a019c05..c285946 100644 --- a/python/pyspark/rdd.py +++ b/python/pyspark/rdd.py @@ -861,7 +861,7 @@ class RDD(object): def func(iterator): acc = zeroValue for obj in iterator: - acc = op(obj, acc) + acc = op(acc, obj) yield acc # collecting result of mapPartitions here ensures that the copy of # zeroValue provided to each partition is unique from the one provided --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org