Skip to content

Commit ed7264b

Browse files
Davies Liudavies
authored andcommitted
[SPARK-12090] [PYSPARK] consider shuffle in coalesce()
Author: Davies Liu <davies@databricks.com> Closes apache#10090 from davies/fix_coalesce. (cherry picked from commit 4375eb3) Signed-off-by: Davies Liu <davies.liu@gmail.com>
1 parent 0d57a4a commit ed7264b

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
@@ -2024,7 +2024,7 @@ def coalesce(self, numPartitions, shuffle=False):
20242024
>>> sc.parallelize([1, 2, 3, 4, 5], 3).coalesce(1).glom().collect()
20252025
[[1, 2, 3, 4, 5]]
20262026
"""
2027-
jrdd = self._jrdd.coalesce(numPartitions)
2027+
jrdd = self._jrdd.coalesce(numPartitions, shuffle)
20282028
return RDD(jrdd, self.ctx, self._jrdd_deserializer)
20292029

20302030
def zip(self, other):

0 commit comments

Comments
 (0)