For the following script, DolphinDB reports the error: The function [nullFill] expects 2 argument(s), but the actual number of arguments is: 1 .

sqlCol(zfill_col, nullFill(0), zfill_col))

How to address this error?

1

There are 1 answers

0
carbonhydrate On BEST ANSWER

In DolphinDB, the func parameter of sqlCol(colName, [func], [alias], [qualifier]) accepts a unary function with no arguments, but the function nullFill is binary. You can use a partial application to fix the value of the second argument of nullFill as 0. My script is listed as follows:

zfill_col = `col0`col1`col2
sqlCol(zfill_col, nullFill{, 0}, zfill_col)