DolphinDB database 从1.01版本开始支持即时编译JIT(https://github.com/dolphindb/... )。JIT又译及时编译或实时编译,是动态编译的一种形式,可提高程序运行效率。上面函数可写成JIT函数如下: @jit def avg_price(price, amount){ hold = 0.0; cost = 0.0; avgPrice = 0.0; n = size(price) avgP...
回答于 2021-05-11 13:50
DolphinDB database中函数rowNo可返回表中每一行的索引位置,因此可试试下面sql语句: select * from t where rowNo(id) % 10 = 0
回答于 2021-05-11 13:48
可以在查询时用format或datetimeFormat转换: DBConnection conn; TableSP table = conn.run("select id,format(ts,'MM/dd/yyyyTHH:mm:ss') as ts from sharedT"); ConstantSP col1=table->getcolumn(1); cout<<col1->getString(0)<<endl;
回答于 2021-05-11 13:48
select tleft.time, sum from wj(t as tleft, t, -1:0, <sum(B) as sum>, `time)
回答于 2021-05-11 13:46
如果客户端不是DolphinDB数据节点,请使用相应的语言API订阅DolphinDB数据节点上的流表。支持的API语言包括Java,C++,c#,Go,Rust,Python,R和Web等。请访问https://github.com/dolphindb获取相应的语言api编程接口。
回答于 2021-05-11 13:45
t1=select count(ProductID) from t pivot by CompanyName, productName nullFill!(t1,0)
回答于 2021-05-11 13:44
在trade.select(cols).where().toDF()中,toDF返回的是一个pandas DataFrame,而select和where都是中间计算,执行完之后,只要不将它赋值给一个变量,就会自动释放。 而在t = trade.select(cols).where() df = t.toDF() 中, t会保留在内存中,只有当t的引用计数变成0的时候,比如将另一个值赋给t,内存才会自动释放。
回答于 2021-05-11 13:43
这个分区的数据可能有问题,时间字段的值非法了。试着单独select一下这个分区的数据看看,如select time from table,其中的time为时间字段.
回答于 2021-05-11 13:42