cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shahryar Sedghi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5240) CQL3 has error with Compund row keys when sceondray index involved
Date Mon, 11 Feb 2013 13:27:13 GMT
Shahryar Sedghi created CASSANDRA-5240:
------------------------------------------

             Summary: CQL3 has error with Compund row keys when sceondray index involved
                 Key: CASSANDRA-5240
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5240
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.2.1
         Environment: Linux centos 6.3
            Reporter: Shahryar Sedghi
            Priority: Blocker


CREATE TABLE  test(
    interval text,
    seq int,
    id int,
    severity int,
    PRIMARY KEY ((interval, seq), id))
    WITH CLUSTERING ORDER BY (id DESC);

insert into test(interval, seq, id , severity) values('t',1, 1, 1);
insert into test(interval, seq, id , severity) values('t',1, 2, 1);
insert into test(interval, seq, id , severity) values('t',1, 3, 2);
insert into test(interval, seq, id , severity) values('t',1, 4, 3);
insert into test(interval, seq, id , severity) values('t',2, 1, 3);
insert into test(interval, seq, id , severity) values('t',2, 2, 3);
insert into test(interval, seq, id , severity) values('t',2, 3, 1);
insert into test(interval, seq, id , severity) values('t',2, 4, 2);

select * from test where severity = 3 and  interval = 't' and seq =1;

Bad Request: Start key sorts after end key. This is not allowed; you probably should not specify
end key at all under random partitioner


The following works fine

CREATE TABLE  test(
    interval text,
    id int,
    severity int,
    PRIMARY KEY (interval, id))
    WITH CLUSTERING ORDER BY (id DESC);

insert into test(interval, id , severity) values('t1', 4, 1);
insert into test(interval, id , severity) values('t1', 1, 3);
insert into test(interval, id , severity) values('t1', 2, 2);
insert into test(interval, id , severity) values('t1', 3, 3);
insert into test(interval, id , severity) values('t2', 3, 3);
 insert into test(interval, id , severity) values('t2', 1, 3);
 insert into test(interval, id , severity) values('t2', 2, 1);

select * from test where severity = 3 and  interval = 't1';
interval | id | severity
----------+----+----------
       t1 |  3 |        3
       t1 |  1 |        3




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