Search code examples
cassandracqlcql3datastax-enterprisedatastax-java-driver

Prepared Statement with collection in IN clause in Datastax Cassandra CQL driver


I am trying to run the following query

SELECT edge_id, b_id FROM booking_by_edge WHERE edge_id IN ?

I bind Java list of Long's as a parameter and I get an exception

SyntaxError: line 0:-1 mismatched input '<EOF>' expecting ')' (ResultSetFuture.java:242)

If I try to use (?) it expects single Long item to be bound, but I need a collection

Is there an error in my syntax?


Solution

  • Got response on Datastax bugzilla, it is currently not supported, but planned

    https://issues.apache.org/jira/browse/CASSANDRA-4210

    Update: Supported in Cassandra 2.0.1