Fix Inconsistent request behavior between datastax driver and cqlsh

String cql = "SELECT * FROM myks.tbl WHERE bid=? AND mid<? LIMIT ? ORDER BY mid DESC ALLOW FILTERING";  

      

If I execute this in cqlsh it works fine with or without ALLOW FILTERING added. If I execute this from the latest (2.1.1) datastax driver I get

com.datastax.driver.core.exceptions.InvalidQueryException: This request cannot be completed because it may involve data filtering and therefore may have unpredictable performance. If you want to execute this query despite performance unpredictability, use ALLOW FILTERING

It clearly works from the command line, so doesn't mean it should work from a driver. What to do?

+3
java cassandra datastax-java-driver


source to share


No one has answered this question yet

Check out similar questions:

five
Getting correct timestamp from cassandra using datastax python-driver
2
Unable to select (by map key of types <text, text>) entry that was inserted into Cassandra with Java Datastax driver
2
Displaying Datastax Drivers ORDER BY ASC / DESC
1
Filtering partition and clustering key with additional criteria
1
Datastax Cassandra invalid request for ALLOW FILTERING
1
Datastax Driver - Column Constraint and Column Fetch
0
How can I query a given cassandra column type using python?
0
Query for a column that is not part of the PC or secondary index
0
Java DataStax Java loop repeating lines
0
This request cannot be completed because it may include data filtering



All Articles
Loading...
X
Show
Funny
Dev
Pics