cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucas Di Pentima <>
Subject Re: Querying by date range when using TimeUUIDType ColumnFamily?
Date Tue, 27 Apr 2010 20:29:20 GMT
I think what Ed asked is that having some CF with TimeUUIDType allowed him to call get_slice
with *any* date range, even though those values weren't inserted in Cassandra.

I'm just a newbie here, but I think that this is not possible, and to do just that you have
to construct an additional index, maybe with this format:

DateRange = { // CF - TimeUUIDType
	YYYYMMDD : { // Row, keyed by day, for example
		time_uuid1 => nil,
		time_uuid2 => nil,
		time_uuid3 => nil,

...being time_uuid[123], the actual column names inserted in the other CF.

Is this correct?


El 27/04/2010, a las 16:50, Justin Sanders escribió:

> You're going to have to build TimeUUIDs based on the date range you are scanning.  Problem
is most UUID libraries build version 1 UUIDs based on the current time.  I was able to get
this working in Python by changing the library to allow me to pass in a time.  This isn't
safe for creating unique UUIDs but works fine for doing slices.
> Justin
> On Tue, Apr 27, 2010 at 11:28 AM, Ed Anuff <> wrote:
> Assuming a ColumnFamily with a CompareWith of TimeUUIDType, is it possible to call get_slice
with an arbitrary date range?  How would valid values for the start and finish attributes
of the slice range be constructed?
> Thanks
> Ed

Lucas Di Pentima - Santa Fe, Argentina

View raw message