incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremiah Jordan <>
Subject Re: Deleting a column vs setting it's value to empty
Date Fri, 10 Feb 2012 21:30:55 GMT
Either one works fine.  Setting to "" may cause you less headaches as 
you won't have to deal with tombstones.  Deleting a non existent column 
is fine.


On 02/10/2012 02:15 PM, Drew Kutcharian wrote:
> Hi Everyone,
> Let's say I have the following object which I would like to save in Cassandra:
> class User {
>    UUID id; //row key
>    String name; //columnKey: "name", columnValue: the name of the user
>    String description; //columnKey: "description", columnValue: the description of the
> }
> Description can be nullable. What's the best approach when a user updates her description
and sets it to null? Should I delete the description column or set it to an empty string?
> In addition, if I go with the delete column strategy, since I don't know what was the
previous value of description (the column could not even exist), what would happen when I
delete a non existent column?
> Thanks,
> Drew

View raw message