用部分应用把round变成1元函数,例如:
t = table(`GME`AMC`KOSS as symbol, 32.512 13.26 64 as price); sql(select=sqlCol("price", round{,2}), from=t).eval();
执行后正确输出如下:
price 32.51 13.26 64
对如下所示内存表t进行查询,其中想保留price的小数为2位:
t = table(`GME`AMC`KOSS as symbol, 32.512 13.26 64 as price); sql(select=sqlCol(round(price,2)), from=t).eval();
执行时报错如下:
Cannot recognize the token price
请问该如何调用round函数?