cassandra语句,在具有集合列类型的表上包含in

qlvxas9a  于 2021-06-14  发布在  Cassandra
关注(0)|答案(0)|浏览(248)

我有一张Cassandratable,如下所示:

CREATE TABLE my_table ( 
name text, 
surname text, 
id_1 text, 
id_2 text, 
contents map< int, FROZEN<MAP<text, text>>>, 
PRIMARY KEY( (name, surname), id_1, id_2) )

id\u 1id\u 2是群集列,我正在尝试执行以下select查询:

SELECT id_1,contents FROM my_table WHERE name='foo' and surname='bar' and id_1 IN ('A', 'B', 'C')

但是,此查询无法处理以下错误:

Cannot restrict clustering columns by IN relations when a collection is selected by the query

这是因为其中一个tables列具有集合类型(map)吗?
如果从select语句中省略“contents”列,这个查询就可以正常工作。
这个查询有什么办法可以用吗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题