Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This error message occurs because in Cassandra, ORDER BY can only be used when querying on the partition key using the "EQ" or "IN" operator. This is because Cassandra stores data in partitions, and when querying on a partition key, the data is already sorted within that partition.

To resolve this error, modify the CQL query so that it includes a restriction on the partition key using "EQ" or "IN". Alternatively, if sorting is needed on another column, consider denormalizing the data and creating a new table with the desired ordering.