Skip to content

Commit e8f1455

Browse files
committed
Fix Python again...
1 parent 3e53f91 commit e8f1455

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

python/pyspark/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2035,7 +2035,7 @@ def isCheckpointed(self):
20352035

20362036
def getCheckpointFile(self):
20372037
checkpointFile = self._jschema_rdd.getCheckpointFile()
2038-
if checkpointFile.isPresent():
2038+
if checkpointFile.isDefined():
20392039
return checkpointFile.get()
20402040

20412041
def coalesce(self, numPartitions, shuffle=False):

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

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

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

482484
override def distinct(numPartitions: Int)
483485
(implicit ord: Ordering[Row] = null): SchemaRDD =
484486
applySchema(super.distinct(numPartitions)(ord))
485487

488+
def distinct(numPartitions: Int): SchemaRDD =
489+
applySchema(super.distinct(numPartitions)(null))
490+
486491
override def filter(f: Row => Boolean): SchemaRDD =
487492
applySchema(super.filter(f))
488493

@@ -500,6 +505,9 @@ class SchemaRDD(
500505
(implicit ord: Ordering[Row] = null): SchemaRDD =
501506
applySchema(super.repartition(numPartitions)(ord))
502507

508+
def repartition(numPartitions: Int): SchemaRDD =
509+
applySchema(super.repartition(numPartitions)(null))
510+
503511
override def subtract(other: RDD[Row]): SchemaRDD =
504512
applySchema(super.subtract(other))
505513

0 commit comments

Comments
 (0)