【cassandra】cannot assign result of function system.now (type timeuuid) to time (type timestamp)
背景
执行如下sql会失败并报如题目中的错误
insert into event (subject, time, type)
values (now(), 'type');
原因
now() returns a timeuuid, not a timestamp
解决办法
尝试用 dateOf(now())
insert into event (time, type)
values (dateOf(now()), 'type');
结果
问题解决