Search code examples
cqlscylla

Scylla token range select result ordering


Is it guaranteed that rows returned for a token range CQL SELECT query are ordered by token value?

From the article https://www.scylladb.com/2017/02/13/efficient-full-table-scans-with-scylla-1-6/:

ScyllaDB orders partitions by a function of the partition key, known as the partitioner, and also as the token function

I'd like to have it confirmed that it's guaranteed (by a specification) because I'd like to implement efficient "group by partitioning key" without having to read the whole result set into memory. I'm using the latest Java driver for Scylla (not for C*) if that makes any difference.


Solution

  • Yes, it is guaranteed (I am the author of that article).