You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Philip Thompson (JIRA)" <ji...@apache.org> on 2015/02/13 16:13:15 UTC

[jira] [Comment Edited] (CASSANDRA-8797) Tuple relation in select query is broken

    [ https://issues.apache.org/jira/browse/CASSANDRA-8797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14320208#comment-14320208 ] 

Philip Thompson edited comment on CASSANDRA-8797 at 2/13/15 3:12 PM:
---------------------------------------------------------------------

I can reproduce this on 2.0-HEAD and 2.1-HEAD. It's unclear if this type of query is supported. Tyler will be able to confirm, and fix the exception regardless.

Thank you for the detailed reproduction steps.


was (Author: philipthompson):
I can reproduce this on 2.0-HEAD. It's unclear if this type of query is supported. Tyler will be able to confirm, and fix the exception regardless.

Thank you for the detailed reproduction steps.

> Tuple relation in select query is broken
> ----------------------------------------
>
>                 Key: CASSANDRA-8797
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8797
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Ubuntu 14.10
> 4 Cores and 8GB RAM
>            Reporter: Ajay
>            Assignee: Tyler Hobbs
>             Fix For: 2.0.13
>
>
> Cassandra version 2.011 (and 2.0.12) 
> 1) Login to CQLSH
> 2) Create a keyspace as below:
> {{CREATE TABLE test1 (campId int,grpId int,itmtypeId int, itemId int, PRIMARY KEY((campId, grpId), itmtypeId, itemid));}}
> 3) Insert 10 rows
> 4) Run {{select * from test1}} and it works
> 5) Run a select query as below:
> {{select * from test1 where token(campid, grpid) = token(987654321, 4) and (itmtypeid, itemid) > (12347, 1234567812);}}
> It fails with error 'TSocket read 0 bytes'
> 6) The actual error in the Cassandra server log is as below:
> {code}
> ERROR [Thrift:2] 2015-02-13 16:22:41,269 CustomTThreadPoolServer.java (line 222) Error occurred during processing of message.
> java.lang.ClassCastException: org.apache.cassandra.cql3.MultiColumnRelation cannot be cast to org.apache.cassandra.cql3.SingleColumnRelation 
> at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.checkTokenFunctionArgumentsOrder(SelectStatement.java:1887)
> at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.processPartitionKeyRestrictions(SelectStatement.java:1873)
> at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:1494)
> at org.apache.cassandra.cql3.QueryProcessor.getStatement(QueryProcessor.java:333)
> at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:171)
> at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1958)
> at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
> at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:204)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745){code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)