0
点赞
收藏
分享

微信扫一扫

Schema for type Unit is not supported

耶也夜 2022-02-20 阅读 145
 //自定义函数实现需求
  def userLpdf(id:String,length:Int,name:String):Unit={
    val len=length-id.length
    "0" * len+id

  }

自定义udf函数的时候,爆出错误Schema for type Unit is not supported

实际上原因是自定义的函数没有返回值,所以导致出错,把Unit改为String或者直接省去就可以解决问题

举报

相关推荐

Unit Testing

Unit 3

0 条评论