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 62D73DED9 for ; Thu, 6 Sep 2012 14:33:08 +0000 (UTC) Received: (qmail 39552 invoked by uid 500); 6 Sep 2012 14:33:08 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 39500 invoked by uid 500); 6 Sep 2012 14:33:08 -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 39354 invoked by uid 99); 6 Sep 2012 14:33:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Sep 2012 14:33:08 +0000 Date: Fri, 7 Sep 2012 01:33:08 +1100 (NCT) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: <919319941.44600.1346941988070.JavaMail.jiratomcat@arcas> In-Reply-To: <793662708.33806.1346782868557.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CASSANDRA-4612) cql error with ORDER BY when using IN 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-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449705#comment-13449705 ] Sylvain Lebresne commented on CASSANDRA-4612: --------------------------------------------- The fix for the case where there is only one ordered column lgtm but this doesn't handle the CompositeComparator case. > cql error with ORDER BY when using IN > ------------------------------------- > > Key: CASSANDRA-4612 > URL: https://issues.apache.org/jira/browse/CASSANDRA-4612 > Project: Cassandra > Issue Type: Bug > Components: Core > Affects Versions: 1.2.0 > Environment: ubuntu, cassandra trunk (commit 769fe895a36868c47101f681f5fdd721bee1ad62 ) > Reporter: Tyler Patterson > Assignee: Pavel Yaskevich > Fix For: 1.2.0 beta 1 > > Attachments: CASSANDRA-4612.patch > > > {code} > CREATE TABLE test( > my_id varchar, > col1 int, > value varchar, > PRIMARY KEY (my_id, col1) > ); > INSERT INTO test(my_id, col1, value) VALUES ( 'key1', 1, 'a'); > INSERT INTO test(my_id, col1, value) VALUES ( 'key2', 3, 'c'); > INSERT INTO test(my_id, col1, value) VALUES ( 'key3', 2, 'b'); > INSERT INTO test(my_id, col1, value) VALUES ( 'key4', 4, 'd'); > SELECT col1 FROM test WHERE my_id in('key1', 'key2', 'key3') ORDER BY col1; > {code} > The following error results: TSocket read 0 bytes > The log gives a traceback: > {code} > ERROR [Thrift:8] 2012-09-04 12:02:15,894 CustomTThreadPoolServer.java (line 202) Error occurred during processing of message. > java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 > at java.util.ArrayList.RangeCheck(ArrayList.java:547) > at java.util.ArrayList.get(ArrayList.java:322) > at org.apache.cassandra.cql3.statements.SelectStatement$SingleColumnComparator.compare(SelectStatement.java:1356) > at org.apache.cassandra.cql3.statements.SelectStatement$SingleColumnComparator.compare(SelectStatement.java:1343) > at java.util.Arrays.mergeSort(Arrays.java:1270) > at java.util.Arrays.sort(Arrays.java:1210) > at java.util.Collections.sort(Collections.java:159) > at org.apache.cassandra.cql3.statements.SelectStatement.orderResults(SelectStatement.java:821) > at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:793) > at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:136) > at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:118) > at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:62) > at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:107) > at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:115) > at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1521) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3618) > at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3606) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) > at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:184) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > {code} -- 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