[
https://issues.apache.org/jira/browse/CASSANDRA-4911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13898081#comment-13898081
]
Tyler Hobbs commented on CASSANDRA-4911:
----------------------------------------
If I define this table:
{noformat}
create table foo (a int, b int, c int, d int, e int, PRIMARY KEY(a, b, c, d));
{noformat}
and run this query:
{noformat}
SELECT e FROM foo WHERE a=1 AND b=1 AND c=1 AND d IN (1, 2) ORDER BY b asc;
{noformat}
I see this AssertionError in the Cassandra log:
{noformat}
java.lang.AssertionError: null
at
org.apache.cassandra.cql3.statements.SelectStatement.orderResults(SelectStatement.java:948)
~[main/:na]
at
org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:863)
~[main/:na]
at
org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:222)
~[main/:na]
at
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:202)
~[main/:na]
at
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:172)
~[main/:na]
at
org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:57)
~[main/:na]
at
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:180)
~[main/:na]
at
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:214)
~[main/:na]
at
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:204)
~[main/:na]
at
org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1973)
~[main/:na]
at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4486)
~[thrift/:na]
at
org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4470)
~[thrift/:na]
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
~[libthrift-0.9.1.jar:0.9.1]
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
~[libthrift-0.9.1.jar:0.9.1]
at
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194)
~[main/:na]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
~[na:1.7.0_40]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
~[na:1.7.0_40]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_40]
{noformat}
> Lift limitation that order by columns must be selected for IN queries
> ---------------------------------------------------------------------
>
> Key: CASSANDRA-4911
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4911
> Project: Cassandra
> Issue Type: Improvement
> Components: API
> Affects Versions: 1.2.0 beta 1
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Priority: Minor
> Fix For: 2.1
>
> Attachments: 4911.txt
>
>
> This is the followup of CASSANDRA-4645. We should remove the limitation that
> for IN queries, you must have columns on which you have an ORDER BY in the
> select clause.
> For that, we'll need to automatically add the columns on which we have an
> ORDER BY to the one queried internally, and remove it afterwards (once the
> sorting is done) from the resultSet.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)