我有此表在卡桑德拉密鑰空間:集團在CQL的卡桑德拉DB不工作
create table hashtags(
id uuid,
text text,
frequence int,
primary key ((text), frequence, id))
with clustering order by (frequence desc, id asc);
所以我text
爲分區鍵和frequence, id
作爲聚集鍵。 據Cassandra documentation關於爲GROUP BY
操作的支持,我應該能夠運行這類查詢:
select text, sum(frequence) from hashtags
group by text;
但我不斷收到此錯誤:
com.datastax.driver.core.exceptions.SyntaxError: line 2:0 no viable alternative at input 'group' (...text, sum(frequence) from [hashtags] group...)
有什麼我從誤解指南?我怎樣才能正確運行這個查詢? 感謝您的幫助。
? –