cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-3771) Allow paging through non-ordered partitioner results in CQL3
Date Thu, 03 May 2012 16:14:50 GMT


Sylvain Lebresne updated CASSANDRA-3771:

    Attachment: 3771.txt

So I agree that for pagination though large queries, some automatic paging will be a better
solution most of the time. However I think there is probably cases where this won't work.
For instance if you want to store the keys on a given replica (for which you know the token
ranges), or if you want to write a job going through all your data and want to be able to
not restart from the beginning on some failure and maybe you don't want to go full map-reduce
on it.

Anyway, not pretending those are very common, but I think there still is value to exposing
that token() function. So attached patch to do just that. It allows to write either "token(k)
= '1290845903242'" or "token(k) = token('some value')".
> Allow paging through non-ordered partitioner results in CQL3
> ------------------------------------------------------------
>                 Key: CASSANDRA-3771
>                 URL:
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 1.1.0
>            Reporter: Jonathan Ellis
>              Labels: cql
>             Fix For: 1.1.1
>         Attachments: 3771.txt
> CQL < 3 silently turns a "key >= X" into "token(key) >= token(X)".  This is
not what users will expect, since many of the rows returned will not in fact satisfy the requested
key inequality.  We should add syntax that makes the difference between keys and tokens explicit,
possibly with a token() "function" as imagined here.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message