Skip to content

Commit c47a737

Browse files
Davies Liudavies
authored andcommitted
[SPARK-12090] [PYSPARK] consider shuffle in coalesce()
Author: Davies Liu <[email protected]> Closes #10090 from davies/fix_coalesce. (cherry picked from commit 4375eb3) Signed-off-by: Davies Liu <[email protected]>
1 parent 3c4938e commit c47a737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/rdd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ def coalesce(self, numPartitions, shuffle=False):
20152015
>>> sc.parallelize([1, 2, 3, 4, 5], 3).coalesce(1).glom().collect()
20162016
[[1, 2, 3, 4, 5]]
20172017
"""
2018-
jrdd = self._jrdd.coalesce(numPartitions)
2018+
jrdd = self._jrdd.coalesce(numPartitions, shuffle)
20192019
return RDD(jrdd, self.ctx, self._jrdd_deserializer)
20202020

20212021
def zip(self, other):

0 commit comments

Comments
 (0)