Rick Shaw created CASSANDRA-4945: ------------------------------------ Summary: CQL3 does handle List append or prepend with a "Prepared" list Key: CASSANDRA-4945 URL: https://issues.apache.org/jira/browse/CASSANDRA-4945 Project: Cassandra Issue Type: Bug Affects Versions: 1.2.0 beta 2 Environment: CQL3 Thrift methods (new) Reporter: Rick Shaw Priority: Minor
I can successfully update a List using the "literal" syntax: {code} UPDATE testcollection SET L = [98,99,100] + L WHERE k = 1; {code} And I can successfully "upset" a List using the "Prepared" syntax: {code} UPDATE testcollection SET L = ? WHERE k = 1 {code} by providing a decoded List<Integer> in the bind values. But using the "prepared" syntax for an prepend like: {code} UPDATE testcollection SET L = ? + L WHERE k = 1 {code} fails with the following message: {code} java.sql.SQLSyntaxErrorException: InvalidRequestException(why:line 1:33 mismatched input '+' expecting K_WHERE) at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:92) ... ... {code} and an append of a "prepared" syntax like: {code} UPDATE testcollection SET L = L + ? WHERE k = 1 {code} fails as follows: {code} java.sql.SQLSyntaxErrorException: InvalidRequestException(why:invalid operation for non commutative columnfamily testcollection) at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.<init>(CassandraPreparedStatement.java:92) ... ... {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira