Is there a way to filter greater than one column and less than another, or to model appropriately?
create table foo (id int, low int, high int, primary key (id, low, high));
These queries work:
select * from foo;
select * from foo where id = 1 and low < 0;
But this query does not:
select * from foo where id = 1 and low < 0 and high >10;
and results in:
InvalidRequest: Error from server: code=2200 [Invalid query] message="Clustering column "high" cannot be restricted (preceding column "low" is restricted by a non-EQ relation)"
I've currently resorted to allowing filtering. Its on one partition, and traces for scenarios that far exceed the anticipated scenarios execute in acceptable ranges, but I wonder if there is a better way to model the table to all getting the information without resulting to filtering?