I am new to scala. I was reading one code not able to understand . Can someone please help me to understand below code ?
def intersectByKey[K: ClassTag, V: ClassTag](rdd1: RDD[(K, V)], rdd2: RDD[(K, V)]): RDD[(K, V)] = {
rdd1.cogroup(rdd2).flatMapValues{
case (Nil, _) => None
case (_, Nil) => None
case (x, y) => x++y
}
}
What does below line means ? How it will be evaluated ?
case (x, y) => x++y
Thanks