You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benedict (JIRA)" <ji...@apache.org> on 2015/07/02 09:33:05 UTC

[jira] [Comment Edited] (CASSANDRA-9701) Enforce simple << complex sort order more strictly and efficiently

    [ https://issues.apache.org/jira/browse/CASSANDRA-9701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611595#comment-14611595 ] 

Benedict edited comment on CASSANDRA-9701 at 7/2/15 7:32 AM:
-------------------------------------------------------------

Thanks. Done with one further nit: i've shifted those bits up to the top of an int, and encoded the position() in the lower bits, since we might as well perform them all at once.



was (Author: benedict):
Thanks. Done with one further nit: i've shifted those bits up to the top of an int, and encoded the position() in the lower bits, since we might as well perform them all at once.

I'll file a follow-up ticket (though won't attack it immediately) to precompute the comparison between interned ColumnIdentifiers. Since we now intern them, it should be possible to have a value we stash for purposes of comparison (that we can modify over the run time of the application to ensure it is always consistent with any existing ColumnIdentifier). Either that, or the result of comparing any two ColumnDefinition within a group that we know will only be compared with each other; whichever turns out to be easiest.

> Enforce simple << complex sort order more strictly and efficiently
> ------------------------------------------------------------------
>
>                 Key: CASSANDRA-9701
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9701
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Benedict
>            Priority: Minor
>             Fix For: 3.0 beta 1
>
>
> A small refactor as follow up to 8099. By splitting SIMPLE and COMPLEX into their own Kind, we can simplify the compareTo method and obtain greater certainty that we don't (now or in future) accidentally break the required sort order that simple << complex.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)