【发布时间】:2014-12-01 23:51:42
【问题描述】:
Cassandra CQL:使用复合键和集群键创建的表。当我尝试从分区键执行 select * 时,我能够检索所有数据并且它也适用于关系运算符()。 但是,当我使用具有正确值的等于(=)运算符查询特定集群键时,它返回 0 行。
表格:
CREATE TABLE entity_data (
received_date timestamp,
entity text,
received_time timestamp,
node int,
primary key ((received_date ,entity),received_time));
数据(从实体中选择 *):
received_date | entity | received_time | node_id
2014-09-24 00:00:00+0400 | NA | 2014-09-24 18:56:55+0400 | 0 |
使用条件查询: -- 这里不起作用
select * from entity_data
where received_date = '2014-09-24 00:00:00+0400' and entity = 'NA'
and received_time='2014-09-24 18:56:55+0400';
(0 rows)
-- 返回 0 行。
【问题讨论】:
标签: cassandra cassandra-2.0 cql3 nosql