Ordering of data and Relational Operator support in Kundera-cassadnra
Hi, I have this column family CREATE TABLE "ChangeStatus" ( "ChangeID" int, "ChangeStatusName" varchar, PRIMARY KEY("ChangeID") );
and i need to fetch records where the ChangeID is 1)greater than 5 and 2)also need to ORDER the data based in the ChangeID.
But when i try that i get "Bad Request: Only EQ and IN relation are supported on the partition key for random partitioners (unless you use the token() function)"
Token function doesn't seem to return consistent data. I am using Kundera-Cassandra and am using CQL_VERSION_3_0. in my code Please suggest what to do?
Hi, Either You need to change partitioning schema from Random to Ordered partitioning to get it working, or need to devise a way using composite columns.
So if you create composite key with ChangeID as partition key and ChangeStatusName as cluster key. It should be sorted by ChangeID.
-Vivek
Have a look at: http://www.planetcassandra.org/blog/post/composite-keys-in-apache---cassandra
for more details.
-Vivek
Thanks Vivek that worked for me.