Small fix to test for distinct

This commit is contained in:
Matei Zaharia 2013-02-04 13:14:54 -08:00
parent aa4ee1e9e5
commit f6ec547ea7

View file

@ -14,7 +14,7 @@ class RDDSuite extends FunSuite with LocalSparkContext {
val dups = sc.makeRDD(Array(1, 1, 2, 2, 3, 3, 4, 4), 2)
assert(dups.distinct().count() === 4)
assert(dups.distinct.count === 4) // Can distinct and count be called without parentheses?
assert(dups.distinct().collect === dups.distinct().collect)
assert(dups.distinct.collect === dups.distinct().collect)
assert(dups.distinct(2).collect === dups.distinct().collect)
assert(nums.reduce(_ + _) === 10)
assert(nums.fold(0)(_ + _) === 10)