Skip to content

Commit 6d86578

Browse files
committed
Ok one more attempt in fixing Python...
1 parent e8f1455 commit 6d86578

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

python/pyspark/sql.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,14 +2039,14 @@ def getCheckpointFile(self):
20392039
return checkpointFile.get()
20402040

20412041
def coalesce(self, numPartitions, shuffle=False):
2042-
rdd = self._jschema_rdd.coalesce(numPartitions, shuffle)
2042+
rdd = self._jschema_rdd.coalesce(numPartitions, shuffle, None)
20432043
return SchemaRDD(rdd, self.sql_ctx)
20442044

20452045
def distinct(self, numPartitions=None):
20462046
if numPartitions is None:
20472047
rdd = self._jschema_rdd.distinct()
20482048
else:
2049-
rdd = self._jschema_rdd.distinct(numPartitions)
2049+
rdd = self._jschema_rdd.distinct(numPartitions, None)
20502050
return SchemaRDD(rdd, self.sql_ctx)
20512051

20522052
def intersection(self, other):
@@ -2057,7 +2057,7 @@ def intersection(self, other):
20572057
raise ValueError("Can only intersect with another SchemaRDD")
20582058

20592059
def repartition(self, numPartitions):
2060-
rdd = self._jschema_rdd.repartition(numPartitions)
2060+
rdd = self._jschema_rdd.repartition(numPartitions, None)
20612061
return SchemaRDD(rdd, self.sql_ctx)
20622062

20632063
def subtract(self, other, numPartitions=None):

sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,6 @@ class SchemaRDD(
476476
(implicit ord: Ordering[Row] = null): SchemaRDD =
477477
applySchema(super.coalesce(numPartitions, shuffle)(ord))
478478

479-
def coalesce(numPartitions: Int, shuffle: Boolean): SchemaRDD =
480-
applySchema(super.coalesce(numPartitions, shuffle)(null))
481-
482479
override def distinct(): SchemaRDD = applySchema(super.distinct())
483480

484481
override def distinct(numPartitions: Int)
@@ -505,9 +502,6 @@ class SchemaRDD(
505502
(implicit ord: Ordering[Row] = null): SchemaRDD =
506503
applySchema(super.repartition(numPartitions)(ord))
507504

508-
def repartition(numPartitions: Int): SchemaRDD =
509-
applySchema(super.repartition(numPartitions)(null))
510-
511505
override def subtract(other: RDD[Row]): SchemaRDD =
512506
applySchema(super.subtract(other))
513507

0 commit comments

Comments
 (0)