我已经像这样创建了我的桌子..
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."