Skip to content

Commit c85e1e5

Browse files
committed
[SPARK-2470] PEP8 fixes to join.py
1 parent d14f2f1 commit c85e1e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/pyspark/join.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333

3434
from pyspark.resultiterable import ResultIterable
3535

36+
3637
def _do_python_join(rdd, other, numPartitions, dispatch):
3738
vs = rdd.map(lambda (k, v): (k, (1, v)))
3839
ws = other.map(lambda (k, v): (k, (2, v)))
39-
return vs.union(ws).groupByKey(numPartitions).flatMapValues(lambda x : dispatch(x.__iter__()))
40+
return vs.union(ws).groupByKey(numPartitions).flatMapValues(lambda x: dispatch(x.__iter__()))
4041

4142

4243
def python_join(rdd, other, numPartitions):
@@ -85,6 +86,7 @@ def make_mapper(i):
8586
vrdds = [rdd.map(make_mapper(i)) for i, rdd in enumerate(rdds)]
8687
union_vrdds = reduce(lambda acc, other: acc.union(other), vrdds)
8788
rdd_len = len(vrdds)
89+
8890
def dispatch(seq):
8991
bufs = [[] for i in range(rdd_len)]
9092
for (n, v) in seq:

0 commit comments

Comments
 (0)