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 79A30CD57 for ; Thu, 17 May 2012 16:32:35 +0000 (UTC) Received: (qmail 80868 invoked by uid 500); 17 May 2012 16:32:35 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 80825 invoked by uid 500); 17 May 2012 16:32:35 -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 80816 invoked by uid 99); 17 May 2012 16:32:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 16:32:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 16:32:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CAEABAA63 for ; Thu, 17 May 2012 16:32:11 +0000 (UTC) Date: Thu, 17 May 2012 16:32:11 +0000 (UTC) From: "Jonathan Ellis (JIRA)" To: commits@cassandra.apache.org Message-ID: <2040974220.9265.1337272331832.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <850340988.644.1337108733937.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CASSANDRA-4246) cql3 ORDER BY not ordering 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-4246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13277943#comment-13277943 ] Jonathan Ellis commented on CASSANDRA-4246: ------------------------------------------- Is this right? {code} if (stmt.keyRestriction == null || !(stmt.keyRestriction.isEquality() && stmt.keyRestriction.eqValues.size() == 1)) {code} I would have expected {code} if (stmt.keyRestriction == null || !stmt.keyRestriction.isEquality() || stmt.keyRestriction.eqValues.size() != 1) {code} > cql3 ORDER BY not ordering > -------------------------- > > Key: CASSANDRA-4246 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4246 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 1.1.0 > Reporter: paul cannon > Assignee: Sylvain Lebresne > Labels: cql3 > Fix For: 1.1.1 > > Attachments: 4246.txt > > > Creating the simplest composite-key cql3 table I can think of, populating it with a few rows of data, then trying to do a query with an ORDER BY does not yield ordered results. > Here's a cql script: > {noformat} > create keyspace test with strategy_class = 'SimpleStrategy' > and strategy_options:replication_factor = 1; > use test; > create table moo (a int, b int, c int, primary key (a, b)); > insert into moo (a, b, c) values (123, 12, 3400); > insert into moo (a, b, c) values (122, 13, 3500); > insert into moo (a, b, c) values (124, 10, 3600); > insert into moo (a, b, c) values (121, 11, 3700); > select * from moo; > select * from moo order by b; > {noformat} > Here is the output of those two queries: > {noformat} > a | b | c > -----+----+------ > 121 | 11 | 3700 > 122 | 13 | 3500 > 124 | 10 | 3600 > 123 | 12 | 3400 > a | b | c > -----+----+------ > 121 | 11 | 3700 > 122 | 13 | 3500 > 124 | 10 | 3600 > 123 | 12 | 3400 > {noformat} > I also tried these using the bare thrift interface, to make sure it wasn't python-cql or cqlsh doing something stupid. Same results. Am I totally missing something important here about how this is supposed to work? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira