Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5354DED4F for ; Wed, 20 Feb 2013 06:29:15 +0000 (UTC) Received: (qmail 8612 invoked by uid 500); 20 Feb 2013 06:29:15 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 8547 invoked by uid 500); 20 Feb 2013 06:29:14 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 8205 invoked by uid 99); 20 Feb 2013 06:29:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2013 06:29:13 +0000 Date: Wed, 20 Feb 2013 06:29:13 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-5240) CQL3 has error with Compund row keys when secondray index involved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-5240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-5240: ---------------------------------------- Priority: Major (was: Blocker) > CQL3 has error with Compund row keys when secondray 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 > Assignee: Sylvain Lebresne > Fix For: 1.2.2 > > Attachments: 5240.patch > > > 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); > 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); > -- > CREATE INDEX ON test(severity); > 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