incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahryar Sedghi <shsed...@gmail.com>
Subject Re: CQL 3 compound row key error
Date Mon, 11 Feb 2013 14:40:39 GMT
Thanks Aaron. Opened
CASSANDRA-5240<https://issues.apache.org/jira/browse/CASSANDRA-5240CASSANDRA-5240>


On Mon, Feb 11, 2013 at 4:34 AM, aaron morton <aaron@thelastpickle.com>wrote:

> That sounds like a bug, or something that is still under work. Sylvain has
> his finger on all things CQL.
>
> Can you raise a ticket on https://issues.apache.org/jira/browse/CASSANDRA
>
> Cheers
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> New Zealand
>
> @aaronmorton
> http://www.thelastpickle.com
>
> On 11/02/2013, at 4:01 PM, Shahryar Sedghi <shsedghi@gmail.com> wrote:
>
> 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
>
>
>


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

Mime
View raw message