Skip to content

Commit e5f469a

Browse files
committed
Changed to sc.emptyRDD and Array.empty for consistancy with rest of file
1 parent e66e610 commit e5f469a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/test/scala/org/apache/spark/rdd/RDDSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,9 +847,9 @@ class RDDSuite extends SparkFunSuite with SharedSparkContext {
847847
}
848848

849849
test("cartesian on empty RDD") {
850-
val a = sc.makeRDD(Array[Int]())
850+
val a = sc.emptyRDD[Int]
851851
val b = sc.parallelize(1 to 3)
852-
val cartesian_result = Array[(Int, Int)]()
852+
val cartesian_result = Array.empty[(Int, Int)]
853853
assert(a.cartesian(a).collect().toList === cartesian_result)
854854
assert(a.cartesian(b).collect().toList === cartesian_result)
855855
assert(b.cartesian(a).collect().toList === cartesian_result)

0 commit comments

Comments
 (0)