When using map() and lookup() in conjunction, I get an exception (each independently works fine). I'm using Spark 0.9.0/Scala 2.10.3
val a = sc.parallelize(Array(11)) val m = sc.parallelize(Array((11,21))) a.map(m.lookup(_)(0)).collect 14/05/14 15:03:35 ERROR Executor: Exception in task ID 23 scala.MatchError: null at org.apache.spark.rdd.PairRDDFunctions.lookup(PairRDDFunctions.scala:551) I'm able to work around it with: a.map((_,0)).join(m).map(_._2._2).collect