You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Olivier LHeureux (JIRA)" <ji...@apache.org> on 2013/04/11 21:36:18 UTC
[jira] [Commented] (CASSANDRA-5230) cql3 doesn't support multiple
clauses on primary key components
[ https://issues.apache.org/jira/browse/CASSANDRA-5230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13629262#comment-13629262 ]
Olivier LHeureux commented on CASSANDRA-5230:
---------------------------------------------
If I add another key like:
CREATE TABLE foo (
key text,
c text,
d text,
v text,
PRIMARY KEY (key, c, d)
);
select c from foo where key = 'foo' and c in ('1', '2') will still result in a Bad Request error.
Is this the expected behavior?
> 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