Without looking at the code I would expect EMPTY to work for open
bound on both left and right.

If that doesn't work I would set a breakpoint and have a look at what
"SELECT *" gets turned into.

On Tue, Feb 18, 2014 at 11:45 AM, Berenguer Blasi <bbl...@jblasi.com> wrote:
> Hi all,
>
> when iterating CFs with getSequentialIterator you have to specify him a
> range. But what do you do when you need to:
>
> A- Scan the full range?
> B- Scan from key X to the end?
>
> Scanning between keys X,Y is easy as you just specify them in the range.
> Scanning up to Y can be done with ByteBufferUtil.EMPTY_BYTE_BUFFER as the
> left limit.
>
> The problem is how to tell him the righ limit is 'open'. An assert will
> prevent it.
>
> I was wondering what is the right way to do that. I am stuck with that and I
> am sure it will be the easiest thing but I can't get round it... This is how
> I am building the range:
>
> Range<RowPosition> myRange =
>                                 new Range<RowPosition>(
> RowPosition.forKey(ByteBufferUtil.EMPTY_BYTE_BUFFER,
> index.getIndexCfs().partitioner),
> RowPosition.forKey(ByteBufferUtil.bytes(1975L),
> index.getIndexCfs().partitioner),
> index.getIndexCfs().partitioner);
>
> Thanks in advance.



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced

Reply via email to