@@ -493,7 +493,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
493
493
def leftOuterJoin [W ](other : RDD [(K , W )], partitioner : Partitioner ): RDD [(K , (V , Option [W ]))] = {
494
494
this .cogroup(other, partitioner).flatMapValues { pair =>
495
495
if (pair._2.isEmpty) {
496
- pair._1.iterator.map(v => (v, None ): ( V , Option [ W ]) )
496
+ pair._1.iterator.map(v => (v, None ))
497
497
} else {
498
498
for (v <- pair._1.iterator; w <- pair._2.iterator) yield (v, Some (w))
499
499
}
@@ -510,7 +510,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
510
510
: RDD [(K , (Option [V ], W ))] = {
511
511
this .cogroup(other, partitioner).flatMapValues { pair =>
512
512
if (pair._1.isEmpty) {
513
- pair._2.iterator.map(w => (None , w): ( Option [ V ], W ) )
513
+ pair._2.iterator.map(w => (None , w))
514
514
} else {
515
515
for (v <- pair._1.iterator; w <- pair._2.iterator) yield (Some (v), w)
516
516
}
@@ -528,8 +528,8 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
528
528
def fullOuterJoin [W ](other : RDD [(K , W )], partitioner : Partitioner )
529
529
: RDD [(K , (Option [V ], Option [W ]))] = {
530
530
this .cogroup(other, partitioner).flatMapValues {
531
- case (vs, Seq ()) => vs.iterator.map(v => (Some (v), None ): ( Option [ V ], Option [ W ]) )
532
- case (Seq (), ws) => ws.iterator.map(w => (None , Some (w)): ( Option [ V ], Option [ W ]) )
531
+ case (vs, Seq ()) => vs.iterator.map(v => (Some (v), None ))
532
+ case (Seq (), ws) => ws.iterator.map(w => (None , Some (w)))
533
533
case (vs, ws) => for (v <- vs.iterator; w <- ws.iterator) yield (Some (v), Some (w))
534
534
}
535
535
}
0 commit comments