0
我有下表。Cassandra - EQ關係在時間戳主鍵上不起作用
CREATE TABLE experiment(
id uuid,
country text,
data text,
insert_timestamp timestamp,
PRIMARY KEY(insert_timestamp));
我通過
INSERT INTO experiment(id, country, data, insert_timestamp) VALUES (uuid(), 'my', 'the data', dateof(now()));
插入數據當我
SELECT * from experiment;
我得到
insert_timestamp | country | data | id
--------------------------+---------+----------+--------------------------------------
2016-03-03 03:04:36+0000 | my | the data | e08cddd2-b93d-4e39-b0f3-82b813f83a87
但是,如果我SELECT
通過insert_timestamp
SELECT * from experiment WHERE insert_timestamp = '2016-03-03 03:04:36+0000';
我得到空的結果。
insert_timestamp | country | data | id
------------------+---------+------+----
(0 rows)
任何想法爲什麼這樣?