Reputation: 19
I altered a table by adding a new column (let say x) of boolean type in cassandra. Now I want all the rows in which x is null. SELECT * FROM mytable WHERE x is null , something like that .. I have read in many vlogs that cassandra don't support null type.
So, please tell me if there is any other way to retrieve the rows.
Upvotes: 1
Views: 714
Reputation: 87299
Usually, the SELECT * FROM TABLE WHERE col = something
is usually a very bad query for Cassandra until the col
is at least partition key. As Cassandra is distributed system it will need to fetch data from all nodes and return it. When you have relatively big amount of data in Cassandra cluster, most probably this query will just timeout.
You can still perform similar query, but it will be more complicated. You can either:
doc
folder);P.S. I would recommend to start with the basics of Cassandra to understand how it works - it will make your life easier if you understand what you can do & what can't. For beginning you can start with DS201 course on DataStax Academy.
Upvotes: 0