I create a table with counter column in Cassandra, just like :
create table test_count(
pk int,
count counter,
primary key (pk)
);
And after that I update some record like:
update test_count set count = count + 1 where pk = 1;
Then I want to reset the count to 0, but there's no reset command in cql, so I delete the record:
delete from test_count where pk = 1;
And then I re-execute the update CQL, but when I select * from test_count
, there's no record with pk = 1
, so is it a bug of Cassandra? When you delete the record with counter column, it disappears forever? How can I reset the count column to 0? How can I re-insert a record with counter column?