What do core developers think? Should I fill an issue in Jira?IMHO this is a not implemented feature in such case. Instead of fetching whole wide row using partitioning key and filtering it on client side this can be done on server side. In my particular case this will be more optimal than adding secondary index. Maybe in case if there is a secondary index and the whole partitioning key specified C* can use some statistics about data to determine which way to go to make query more selective.Hello Paco,thanks for response.
2014-04-25 15:23 GMT+06:00 Paco Trujillo <F.Trujillo@genetwister.nl>:
It is not a bug/not implemented feature and you are not doing nothing wrong. As you can check on the documentation you can only filter on a key name or a column that has a secondary index created on it:
I have the following schema:
CREATE TABLE my_table (
PRIMARY KEY ((a, b), c, d)
SELECT * FROM my_table WHERE a=? AND b=? AND e=? ALLOW FILTERING
The query above gives me the following exception message:
com.datastax.driver.core.exceptions.InvalidQueryException: No indexed columns present in by-columns clause with Equal operator
SELECT * FROM my_table WHERE a=? AND b=?
Works fine and I see not reason why original query should not be able to do such filtering.
If I add a secondary index by "e" column, then such query will work, but I do not want to do that.
Is that a bug/not implemented feature? Or maybe I'm doing something wrong?