Skip to content

Commit 2f3afa3

Browse files
committed
Fix Python test
1 parent 0b735e9 commit 2f3afa3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/pyspark/rdd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ def aggregateByKey(self, zeroValue, seqFunc, combFunc, numPartitions=None):
11881188
for merging values between partitions. To avoid memory allocation, both of these functions are
11891189
allowed to modify and return their first argument instead of creating a new U.
11901190
"""
1191-
return self.combineByKey(lambda v: func(zeroValue, v), seqFunc, combFunc, numPartitions)
1191+
return self.combineByKey(lambda v: seqFunc(zeroValue, v), seqFunc, combFunc, numPartitions)
11921192

11931193
def foldByKey(self, zeroValue, func, numPartitions=None):
11941194
"""

python/pyspark/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def combOp(x, y):
198198
x |= y
199199
return x
200200

201-
sets = dict(pairs.aggregateByKey(set(), seqOp, combOp).collect())
201+
sets = dict(data.aggregateByKey(set(), seqOp, combOp).collect())
202202
self.assertEqual(3, len(sets))
203203
self.assertEqual(set([1]), sets[1])
204204
self.assertEqual(set([2]), sets[3])

0 commit comments

Comments
 (0)