Answer the question
In order to leave comments, you need to log in
How to alter table add default value in Cassandra?
Good day to all.
We use two noSQL solutions on our project: monga and cassandra.
Before the release of the new version, the models changed and a Boolean field was added to maintain backward compatibility.
Accordingly, I add this field in Cassandra: ALTER TABLE x ADD y boolean;
But now this field essentially does not exist, they are all Null, and I need it to be False so that the interpretation of null does not spread through the code.
It turns out that I need to do a bulk update on the entire table, but I didn’t succeed. For example, I tried to create a secondary index, on a field that is now always = 0, and : UPDATE x SET y = false WHERE zero_field = 0; does not work.
Isn't there a way to get this case?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question