【发布时间】:2017-05-19 14:25:02
【问题描述】:
我使用的是 Cassandra 3.0,我创建了一个表,如下所示:
CREATE TABLE site (
site_id bigint,
end_date timestamp,
start_date timestamp,
promotion_id uuid,
PRIMARY KEY (site_id, end_date,start_date, promotion_id)
) WITH CLUSTERING ORDER BY (end_date DESC,start_date DESC, promotion_id ASC);
我在这张表中插入一条记录
insert into site (site_id, start_date,end_date,promotion_id) values (10000,'2017-05-11T16:17:48','2017-05-21T16:17:48',8999f91c-a787-4604-9479-f8ead4955f6c);
请问为什么下面的cql返回一条记录?我期待它什么都不返回:
select * from site
where site_id = 10000 and ( end_date, start_date ) <= ( '2117-05-12', '2017-04-12' );
【问题讨论】:
标签: cassandra