在DolphinDB database中碰到了函数与列同名的情况,如下面代码:
trade = table(`SH600000`SH600001 as symbol,2019.11.07 2019.11.08 as date, 09:30:00.000 09:30:00.000 as time,30.0 32.0 as price,100 200 as volume)
def price(v){
return v* 50.0
}
select each(price,volume) from trade
price既是函数,又是trade的列名,执行时会报错:
Usage: each(func, args...). func must be a function definition.
我在计算时怎么让程序知道price是一个函数,而不是列名呢?