cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corey Hulen (Commented) (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-3307) Java JDBC driver fails with DELETE statements
Date Tue, 04 Oct 2011 17:45:34 GMT


Corey Hulen commented on CASSANDRA-3307:

The consistancy level error can be fixed by changing the regex in drivers/java/src/org/apache/cassandra/cql/jdbc/
on line #66 from 

private static final Pattern Delete = Pattern.compile("DELETE\\s+(.*)\\s+FROM\\s+\\w+\\s+WHERE


private static final Pattern Delete = Pattern.compile("DELETE\\s+(.*)\\s+FROM\\s+\\w+.*\\s+WHERE

Added the ".*" after FROM. Copied pattern from the UPDATE statement

Stack trace for the consistency error

java.sql.SQLSyntaxErrorException: line 1:57 no viable alternative at character '?'
	at org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(
	at org.apache.cassandra.cql.jdbc.CassandraStatement.executeUpdate(
	at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.executeUpdate(

> Java JDBC driver fails with DELETE statements
> ---------------------------------------------
>                 Key: CASSANDRA-3307
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Corey Hulen
> The following 2 statements are valid, but fail in the java jdbc driver.
> "DELETE FROM users WHERE KEY = 'user1'"  // missing column should be valid to delete
entire row
> "DELETE test FROM users USING CONSISTENCY QUORUM WHERE KEY = 'user1'" // Should be valid
to pass consistency level to a delete statment

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message