Reputation: 693
I'm trying to do something like this in CQL:
SELECT address FROM Person WHERE age= 20 or age= 25
But Cassandra doesn't support the OR operator and I can't use IN(20, 25) either, because age isn't a primary key. Is there any way to solve this ?
Thanks in advance.
Upvotes: 11
Views: 8047
Reputation: 965
You can do this with
SELECT address FROM Person WHERE age IN ( 20, 25 )
Upvotes: 9
Reputation: 19377
You will have to perform the disjunction client-side, or use an analytical tool like Hive or Pig.
Upvotes: 6