cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4327) Sorting results when using IN()
Date Fri, 06 Jul 2012 23:10:35 GMT

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

Jonathan Ellis commented on CASSANDRA-4327:
-------------------------------------------

nit: would be cleanest to put the where check in the existing {{if (!stmt.parameters.orderings.isEmpty()))}}
block, where the old where check used to be.

+1 otherwise
                
> Sorting results when using IN() 
> --------------------------------
>
>                 Key: CASSANDRA-4327
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4327
>             Project: Cassandra
>          Issue Type: Improvement
>    Affects Versions: 1.1.1
>            Reporter: Stephen Powis
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>              Labels: cql3, patch, sort
>             Fix For: 1.1.3
>
>         Attachments: CASSANDRA-4327-v2.patch, CASSANDRA-4327.patch, trunk-4327.txt
>
>
> Using the following test schema:
> CREATE TABLE test (
>   my_id varchar, 
>   time_id uuid,
>   value int,
>   PRIMARY KEY (my_id, time_id)
> );
> When you issue a CQL3 query like: 
> select * from test where my_id in('key1', 'key2') order by time_id; 
> You receive the error:
> "Ordering is only supported if the first part of the PRIMARY KEY is restricted by an
Equal"
> I'm including a patch I put together after spending an hour or two poking thru the code
base that sorts the results for these types of queries.  I'm hoping someone with a deeper
understanding of Cassandra's code base can take a look at it, clean it up or use it as a starting
place, and include it in an upcoming release.

--
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

        

Mime
View raw message