Weak Conformance In some situations Scala uses a more general conformance relation. A type S weakly conforms to a type T, written S<:wT, if S<:T or both S and T are primitive number types and S precedes T in the following ordering. Byte <:w Short…
经常在写Rdd的时候, 如: val OWNER_ID=row.getAs("OWNER_ID") 等, 运行是可能会报异常 : java.lang.String cannot be cast to scala.runtime.Nothing 后检查后发现,其实应该保证类型一致,应该写成: val OWNER_ID=row.getAs[String]("OWNER_ID") 那么,问题来了, 为啥会有上面的异常出现.查询结果,觉得这篇文章有点意思,就摘抄过来了,…