0
点赞
收藏
分享

微信扫一扫

spark报错:ClassCastException: cannot assign instance of SerializedLambda to field


报错:

​​ClassCastException: cannot assign instance of java.lang.invoke.SerializedLambda to field XXX of type scala.Function1 in instance of XXX​​

解决:

​​val theMethod = (input: String) => theDict.contains(input)​​

改为

​​def theMethod(input: String) = { theDict.contains(input) }​​


举报

相关推荐

0 条评论