【发布时间】:2015-01-15 03:08:40
【问题描述】:
[cqlsh 5.0.1 |卡桑德拉 2.1.0 | CQL 规范 3.2.0 |原生协议 v3]
table:
CREATE TABLE dc.event (
id timeuuid PRIMARY KEY,
name text
) WITH bloom_filter_fp_chance = 0.01;
如何从 Cassandra 获取时间范围的数据?
例如,当我尝试'select * from event where id> maxTimeuuid('2014-11-01 00:05+0000') and minTimeuuid('2014-11-02 10:00+0000')' 时,如此处所示http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/timeuuid_functions_r.html
我收到以下错误:'code=2200 [Invalid query] message="Only EQ and IN relation are supported on the partition key (unless you use the token() function)"'
我可以保留timeuuid作为主键并满足要求吗?
谢谢
【问题讨论】: