Skip to content

Commit 91dc787

Browse files
committed
Taking into account newly added Ordering param
1 parent 79ed52a commit 91dc787

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,36 +342,41 @@ class SchemaRDD(
342342

343343
// Transformations (return a new RDD)
344344

345-
override def coalesce(numPartitions: Int, shuffle: Boolean = false): SchemaRDD =
346-
applySchema(super.coalesce(numPartitions, shuffle))
345+
override def coalesce(numPartitions: Int, shuffle: Boolean = false)
346+
(implicit ord: Ordering[Row] = null): SchemaRDD =
347+
applySchema(super.coalesce(numPartitions, shuffle)(ord))
347348

348349
override def distinct(): SchemaRDD =
349350
applySchema(super.distinct())
350351

351-
override def distinct(numPartitions: Int): SchemaRDD =
352-
applySchema(super.distinct(numPartitions))
352+
override def distinct(numPartitions: Int)
353+
(implicit ord: Ordering[Row] = null): SchemaRDD =
354+
applySchema(super.distinct(numPartitions)(ord))
353355

354356
override def filter(f: Row => Boolean): SchemaRDD =
355357
applySchema(super.filter(f))
356358

357359
override def intersection(other: RDD[Row]): SchemaRDD =
358360
applySchema(super.intersection(other))
359361

360-
override def intersection(other: RDD[Row], partitioner: Partitioner): SchemaRDD =
361-
applySchema(super.intersection(other, partitioner))
362+
override def intersection(other: RDD[Row], partitioner: Partitioner)
363+
(implicit ord: Ordering[Row] = null): SchemaRDD =
364+
applySchema(super.intersection(other, partitioner)(ord))
362365

363366
override def intersection(other: RDD[Row], numPartitions: Int): SchemaRDD =
364367
applySchema(super.intersection(other, numPartitions))
365368

366-
override def repartition(numPartitions: Int): SchemaRDD =
367-
applySchema(super.repartition(numPartitions))
369+
override def repartition(numPartitions: Int)
370+
(implicit ord: Ordering[Row] = null): SchemaRDD =
371+
applySchema(super.repartition(numPartitions)(ord))
368372

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

372376
override def subtract(other: RDD[Row], numPartitions: Int): SchemaRDD =
373377
applySchema(super.subtract(other, numPartitions))
374378

375-
override def subtract(other: RDD[Row], p: Partitioner): SchemaRDD =
376-
applySchema(super.subtract(other, p))
379+
override def subtract(other: RDD[Row], p: Partitioner)
380+
(implicit ord: Ordering[Row] = null): SchemaRDD =
381+
applySchema(super.subtract(other, p)(ord))
377382
}

0 commit comments

Comments
 (0)