Hi all,
I am using C* 1.2.4 with CQL3 and am taking advantage of the new collection support. One usage case I have is that I want a set of text and I need to know the time when each item in the set was written. If I understand CQL3 correctly, the underlying data engine utilizes composites for sets and maps (where sets are just maps with no values). I was hoping that I could store my text items as a set and then somehow get the write time of each item via WRITETIME. Instead it appears that I need to use a map of TEXT to TIMESTAMP which will increase my data set. Does anyone know I way I could expose the write time of set items?
Thanks!
Keith Wright 's gravatar image asked May 23 2013 at 08:18 in Cassandra-User by Keith Wright

1 Answers

You cannot currently unfortunately.
The problem is really just an API one. Since currently you can only ever
query a full collection, you cannot apply writeTime() to only an element,
and applying it to the whole collection doesn't make sense, in the sense
that each element have a write time as you said.
We'll likely allow to query individual elements of collections in the
future, at which point allowing to get the write time of said individual
will work. But let's say that today we just don't have a syntax yet to make
it work.
Sylvain
Sylvain Lebresne 's gravatar image answered May 23 2013 at 09:10 by Sylvain Lebresne

Related Discussions