【发布时间】:2019-08-14 13:37:42
【问题描述】:
我已经创建了这样的表..
CREATE TABLE test1.mytest (
id text,
year text,
time bigint,
crtby text,
data text,
postid text,
upby text,
PRIMARY KEY ((id, year), time)
) WITH CLUSTERING ORDER BY (time DESC)
我想根据时间键对我的数据进行排序。
SELECT * FROM test1.mytest WHERE id ='b' ORDER BY time asc ALLOW FILTERING ;
当我尝试上面的命令时,我得到了
InvalidRequest: Error from server: code=2200 [Invalid query] message="ORDER BY is only supported when the partition key is restricted by an EQ or an IN."
【问题讨论】: