The function [nullFill] expects 2 argument(s), but the actual number of arguments is: 1

请教下sqlCol(zfill_col,nullFill(0),zfill_col))会报【The function [nullFill] expects 2 argument(s), but the actual number of arguments is: 1】,应该怎么写呢?nullFill(0)会报错这个怎么解决呢?

请先 登录 后评论

1 个回答

wale

sqlCol 要求输入的 func 是一个一元函数体,不能够带参数,但由于 nullFill 是一个二元函数,所以需要使用部分应用固定填充值 0,例如:

zfill_col = `col0`col1`col2
sqlCol(zfill_col, nullFill{, 0}, zfill_col)
请先 登录 后评论
  • 1 关注
  • 0 收藏,397 浏览
  • Alex 提出于 2023-10-21 22:30