[
https://issues.apache.org/jira/browse/CASSANDRA-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Lebresne updated CASSANDRA-3749:
----------------------------------------
Attachment: 3749-v2.patch
bq. if we are splitting a Bounds on bounds.right, that means that remainder
overlaps Bounds entirely and so we should add that to the ranges, but instead
we skip it.
Not absolutely certain about the case you mean, but with an example: let say we
have Bounds [3, 5]. And say that one of the token nodes is 5 (so we'll split on
bounds.right). So if you split [3, 5] by 5, you're basically not splitting
anything, since splitting would end up with [3, 5] and (5, 5], but (5, 5] is an
empty range (as it happens, we do use allow creating (5, 5] and it means *all
the ring*. That qualifies as weird honestly but that's the way it work. In any
case, we shouldn't have split create such a range since it wouldn't be
correct). So that's a case of the splitting not changing the input
AbstractBounds and thus null is returned. In SP.GRR, when that happens, we
simply skip to the next token. If for instance that next token (say 10) isn't
contained in [3, 5], we'll just add [3, 5] at the end of the loop.
Attaching v2 that incorporates the comment tweaks, adds tests for SP.GRR for
the two new classes and remove the now useless {{if remainder == null}} test at
the end of the main loop of SP.GRR.
> Allow rangeSlice queries to be start/end inclusive/exclusive
> -------------------------------------------------------------
>
> Key: CASSANDRA-3749
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3749
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Fix For: 1.1
>
> Attachments: 3749-comments.txt, 3749-v2.patch, 3749.patch
>
>
> Currently, given two keys k1 and k2, we can only do a rangeSlice on the
> intervals (k1, k2] (Range) and [k1, k2] (Bounds). CQL goes around this
> "manually", by querying one more row if the start is exclusive and removing
> the start/end post-query if necessary. This doesn't work however with the new
> option introduced by CASSANDRA-3742. So this ticket proposes to add support
> (internally) for doing a rangeSlice for the intervals (k1, k2) an [k1, k2).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira