示例代码:
val height:BigDecimal = tmpDS.select("height").first()
.getAs[BigDecimal]("height")
报错:
Exception in thread "main" java.lang.ClassCastException: java.math.BigDecimal cannot be cast to scala.math.BigDecimal
val height:BigDecimal = new BigDecimal(tmpDS.select("height").first()
.getAs[java.math.BigDecimal]("height"))
问题解决