incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahryar Sedghi <shsed...@gmail.com>
Subject CQL 3 compound row key error
Date Mon, 11 Feb 2013 03:01:25 GMT
I am moving my application from 1.1 to 1.2.1  to utilize secondary index
and simplify the data model. In 1.1 I was concentrating some fields into
one separated by ":" for the row key and it was a big string. In V1.2 I use
compound rows key showed in the following test case (interval and seq):


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


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

results:

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

If I define the table as this:

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

 select * from test where severity = 3 and  interval = 't1';

Works fine. Is it a bug?

Thanks in Advance

Shahryar



-- 
"Life is what happens while you are making other plans." ~ John Lennon

Mime
View raw message