在DolphinDB中怎么获取一列值全是NULL的列

假设我有一张DolphinDB内存表如下:

t = table(1..3 as a, `a`b`c as b)
>t
a    b
1    a
2    b
3    c

现在想增加一列全是NULL,如下所示:

a    b    col
1    a    NULL
2    b    NULL
3    c    NULL

尝试select a,b,NULL as col from t,但执行提示:
Not allowed to create void vector.
但执行如下语句,却可以得到全0列:

select a,b,0 as col from t
a    b    col
1    a    0
2    b    0
3    c    0

为什么0换成NULL就不行?

请先 登录 后评论

1 个回答

Jason Tang - 时序数据库技术支持

增加一列类型为double的NULL列有以下方法:

select a,b,00F as col from t
select a,b,double(NULL) as col from t
select a,b,double() as col from t
请先 登录 后评论