Reputation: 11
I am using cassandra 1.1.1. But, whenever I create a column family with composite keys, I will get an error as below,
java.sql.SQLSyntaxErrorException: line 1:117 mismatched input ')' expecting EOF
at org.apache.cassandra.cql.jdbc.CassandraStatement.
doExecute(CassandraStatement.java:180)
at org.apache.cassandra.cql.jdbc.CassandraStatement.executeUpdate(
CassandraStatement.java:237)
at jdbc.cassandra.JdbcCassandra.main(JdbcCassandra.java:59)
My query is CREATE TABLE sblocks (block_id uuid, subblock_id uuid, data blob, PRIMARY KEY (block_id, subblock_id));
Can some body help me out?
Upvotes: 1
Views: 3064
Reputation: 9161
You alluded to the answer in your question title: your connection probably is not actually using CQL version 3. Use of the version 3 syntax has to be explicitly requested.
The latest version of the JDBC driver does not yet support requesting CQL 3. The version in the 'trunk' branch does, though, if you don't mind living on the JDBC driver edge.
The changelog on this commit: http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/main/java/org/apache/cassandra/cql/jdbc/CassandraConnection.java?name=trunk explains how to use it.
Upvotes: 1