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.
You can do this with
SELECT address FROM Person WHERE age IN ( 20, 25 )
You will have to perform the disjunction client-side, or use an analytical tool like Hive or Pig.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With