Skip to content

Commit

Permalink
Ok one more attempt in fixing Python...
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Jan 16, 2015
1 parent e8f1455 commit 6d86578
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions python/pyspark/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,14 +2039,14 @@ def getCheckpointFile(self):
return checkpointFile.get()

def coalesce(self, numPartitions, shuffle=False):
rdd = self._jschema_rdd.coalesce(numPartitions, shuffle)
rdd = self._jschema_rdd.coalesce(numPartitions, shuffle, None)
return SchemaRDD(rdd, self.sql_ctx)

def distinct(self, numPartitions=None):
if numPartitions is None:
rdd = self._jschema_rdd.distinct()
else:
rdd = self._jschema_rdd.distinct(numPartitions)
rdd = self._jschema_rdd.distinct(numPartitions, None)
return SchemaRDD(rdd, self.sql_ctx)

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

def repartition(self, numPartitions):
rdd = self._jschema_rdd.repartition(numPartitions)
rdd = self._jschema_rdd.repartition(numPartitions, None)
return SchemaRDD(rdd, self.sql_ctx)

def subtract(self, other, numPartitions=None):
Expand Down
6 changes: 0 additions & 6 deletions sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,6 @@ class SchemaRDD(
(implicit ord: Ordering[Row] = null): SchemaRDD =
applySchema(super.coalesce(numPartitions, shuffle)(ord))

def coalesce(numPartitions: Int, shuffle: Boolean): SchemaRDD =
applySchema(super.coalesce(numPartitions, shuffle)(null))

override def distinct(): SchemaRDD = applySchema(super.distinct())

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

def repartition(numPartitions: Int): SchemaRDD =
applySchema(super.repartition(numPartitions)(null))

override def subtract(other: RDD[Row]): SchemaRDD =
applySchema(super.subtract(other))

Expand Down

0 comments on commit 6d86578

Please sign in to comment.