Would appreciate any feedback.. Sent from my Iphone Abhishek Maloo
> On Mar 22, 2019, at 11:21 AM, Abhishek Maloo <abhima...@gmail.com> wrote: > > Hello All, > I am trying to migrate some thrift "multiget(multiple partitions)" > operations to CQL. > My Schema is - > CREATE TABLE table1 (key1 int, key2 int, col1 int, val int, primary > key((key1, key2), col1)) > It has a compound partition key - (k1,k2) > > While converting the multiget I came up with this query - > select * from table1 where (k1, k2) IN ((1,1), (2,2)); > > Cassandra threw an exception - "InvalidRequest: Error from server: code=2200 > [Invalid query] message="Multi-column relations can only be applied to > clustering columns but was applied to: key1" > > What is the rationale behind not supporting Multi-column relation for > partition keys only. I understand that we want to discourage the use of > multiget. > > Apparently below are valid cassandra queries - > select * from table1 where k1 IN (1,2) and k2 = 1; > select * from table1 where k1 = 1 and k2 IN (1,2); > > Thanks > -Abhishek