假设有以下列族:
CREATE TABLE points (
shard varchar,
series varchar,
time timestamp,
value varchar,
PRIMARY KEY (shard, series, time)
);
我想执行以下查询:
select * from points where shard=? and series in (?,...,?) and time <? and time >?
或者通过in
子句明确指定时间的版本。在Cassandra 1.2下我得到了
Bad Request: PRIMARY KEY part series cannot be restricted by IN relation
我尝试将series
列拆分为显式复合键并过滤复合列的非第一部分,但无济于事。在大多数现有的Cassandra中还是使用Thrift API?