cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5230) cql3 doesn't support multiple clauses on primary key components
Date Thu, 11 Apr 2013 20:19:17 GMT

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

Aleksey Yeschenko commented on CASSANDRA-5230:
----------------------------------------------

bq. Is this the expected behavior?

Yes, only the last part of the key can be restricted by IN. In your case it's 'd'.
                
> cql3 doesn't support multiple clauses on primary key components
> ---------------------------------------------------------------
>
>                 Key: CASSANDRA-5230
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5230
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0
>            Reporter: Brandon Williams
>            Assignee: Sylvain Lebresne
>             Fix For: 1.2.2
>
>         Attachments: 5230.patch
>
>
> In trying to write a dtest for CASSANDRA-5225, I noticed that given a table such as:
> {noformat}
> CREATE TABLE foo (
>   key text,
>   c text,
>   v text,
>   PRIMARY KEY (key, c)
> )
> {noformat}
> It is possible to slice the values of 1 or 2 for c:
> {noformat}
> select c from foo where key = 'foo' and c > '0' and c < '3';
> {noformat}
> However, there is no way to get these explicitly by name, even though it should be possible:
> {noformat}
> cqlsh:Keyspace1> select c from foo where key = 'foo' and c in ('1', '2');
> Bad Request: PRIMARY KEY part c cannot be restricted by IN relation
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message