Given a table like the following:
CREATE TABLE foo (a int, b int, c int, d int, PRIMARY KEY (a, b, c));
We should support a query like this:
SELECT * FROM foo WHERE a = 0 AND b = 0 ORDER BY c ASC;
Currently, this results in the following error:
[Invalid query] message="Order by currently only support the ordering of columns following their declared order in the PRIMARY KEY"
However, since b is restricted by an equality restriction, we shouldn't require it to be present in the ORDER BY clause.
As a workaround, you can use this query instead:
SELECT * FROM foo WHERE a = 0 AND b = 0 ORDER BY b ASC, c ASC;