Lets say we have a CF with the following spec.
create column family Test
with comparator = 'CompositeType(UTF8Type,UTF8Type,UTF8Type)'
and key_validation_class = 'UTF8Type'
and default_validation_class = 'UTF8Type';
And I have columns such as:
Jack:Name:First - Jackson
Jack:Name:Last - Samuel
Jack:Age - 50
Now To delete all columns related to Jack, I need to use as far as I can comprehend
Delete 'Jack:Name:First', 'Jack:Name:Last', 'Jack:Age' from Test where KEY = "friends";
The problem is we do not usually know what meta-data is associated with a user as it may include Timestamp based columns.
such as: Jack:1234567890:Location - Chicago
Can something like -
Delete 'Jack' from Test where KEY = "friends";
be done using the First N components of the CompositeType?
Or should we read first and then delete?
On Thu, Feb 23, 2012 at 4:47 AM, Praveen Baratam <firstname.lastname@example.org>
I am using CompositeType columns and its very convenient to query for a range of columns using the First N components but how do I delete a range of columns using the First N components of the CompositeType column.
In order to specify the exact column names to delete, I would have to read first and then delete.
Is there a better way?