How can I check if a non-primary key field's value is either 'A' or 'B' with a Cassandra CQL query? (I'm using Cassandra 2.0.1)
Here's the table definition:
CREATE TABLE my_table (
my_field text,
my_field2 text,
PRIMARY KEY (my_field)
);
I tried:
1> SELECT * FROM my_table WHERE my_field2 IN ('A', 'B');
2> SELECT * FROM my_table WHERE my_field2 = 'A' OR my_field = 'B' ;
The first one failed with this messeage:
Bad Request: IN predicates on non-primary-key columns (my_field2) is not yet supported
The second one failed because Cassandra CQL doesn't support OR keyword
I couldn't get this simple query working (with a pretty straight forward way). I'm pretty frustrated dealing with CQL queries in general. Is it because Cassandra is not mature enough and has really poor support with queries, or is it me who must change the way of thinking?