我是Cassandra的新手.我遇到了一个问题CQL IN query,如果表有SET类型列它可以工作.
CREATE TABLE test (
test_date bigint,
test_id bigint,
caption text,
PRIMARY KEY(test_date,test_id)
);
select * from test where test_date = 2022015 and test_id IN (1,2);
Run Code Online (Sandbox Code Playgroud)
但如果我添加上面设置的标签,那么它会给出错误
CREATE TABLE test1 (
test_date bigint,
test_id bigint,
tags set<text>,
caption text,
PRIMARY KEY(test_date,test_id)
);
select * from test1 where test_date = 2022015 and test_id IN (1,2);
Run Code Online (Sandbox Code Playgroud)
code = 2200 [无效查询] message ="无法通过IN关系限制列"test_id",因为查询选择了一个集合"