incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Evans <eev...@rackspace.com>
Subject Re: Two dimensional matrices
Date Mon, 12 Apr 2010 21:57:12 GMT
On Mon, 2010-04-12 at 22:40 +0200, Philippe wrote:
> If I understand what you're asking, a rectangle (identified by X and Y
> > coordinates for a time-frame), will boil down to a single column.
> There
> > are certainly no problems with retrieving a single sub-column from a
> > super column.
> >
> I realize I wasn't clear enough. Getting cell {x,y} is easy, I
> understand
> that.
> I am interested in getting a slice of that grid : all cells {x,y}
> where
> 
>    - x_min<=x<=x_max
>    - y_min<=y<=y_max
> 
> My understanding from the docs is that get_range_slices would do it
> but I
> would like confirmation.
> In fact, I believe this is the same question as Dop Sun is asking.

Alright, so assuming we're looking for a slice of the grid against a
given time-frame, that would look something like:

get_range_slice(
    keyspaceName,
    ColumnParent(CFname, timeFrame),
    SlicePredicate(
        slice_range=SliceRange(xstart, xend, false, colCount)
    ),
    ystart,
    yend,
    rowCount,
    consistencyLevel,
)

Does that help?

> > > Will the result associate each value with its key and column ?
> > The result will be a column that contains the binary value, which
> you
> > obtained by using key, column family, and super column name. So,
> yes.
> >
> What about this new case ? 

The result will be a collection of KeySlices representing the key and
corresponding columns, (so yes).

-- 
Eric Evans
eevans@rackspace.com


Mime
View raw message