Details
Description
We have a table with CLUSTERING ORDER BY (date DESC). We try to do a query C* with paging and ORDER BY date ASC.
This leads to the following exception in C* when pager goes to the last page:
ERROR [Native-Transport-Requests:1287744] 2013-10-30 01:53:14,720 ErrorMessage.java (line 210) Unexpected exception during request
java.lang.AssertionError: Added column does not sort as the first column
at org.apache.cassandra.db.ArrayBackedSortedColumns.addColumn(ArrayBackedSortedColumns.java:115)
at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
at org.apache.cassandra.service.pager.AbstractQueryPager.discardLast(AbstractQueryPager.java:238)
at org.apache.cassandra.service.pager.AbstractQueryPager.discardLast(AbstractQueryPager.java:182)
at org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:100)
at org.apache.cassandra.service.pager.SliceQueryPager.fetchPage(SliceQueryPager.java:33)
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:179)
at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:56)
at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:101)
at org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:235)
at org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:139)
at org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:296)
at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:45)
at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
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:724)