Cassandra IN query not working if table has SET type column

后端 未结 3 1376
别跟我提以往
别跟我提以往 2021-02-06 02:02

I am new to Cassandra. I got a issue in CQL IN query ,if table has SET type column it works.

CREATE TABLE test (
    test_date bigint, 
    test_id          


        
3条回答
  •  不要未来只要你来
    2021-02-06 02:49

    I'm not sure why this restriction should apply particulary for collections. But in your case you can get around this issue by making the test_id part of your partition key:

    PRIMARY KEY((test_date,test_id))

    This will allow you to do IN queries as long as you specify the first part of the composite key (test_date).

提交回复
热议问题