spark匿名函数不做任何处理的时候为什么不能简写
木木竹 2019-07-08 04:39:59 spark匿名函数不做任何处理的时候为什么不能简写,
比如:
rdd4.combineByKey(x=>x,(x:Int,y:Int)=>x+y,(x:Int,y:Int)=>x+y)
为什么第一个参数不能简写为:
rdd4.combineByKey(_,(x:Int,y:Int)=>x+y,(x:Int,y:Int)=>x+y)
比如:
rdd.map(x=>x)
为什么不能简写为
rdd.map(_)