[ 
https://issues.apache.org/jira/browse/CASSANDRA-10532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15309999#comment-15309999
 ] 

Benjamin Lerer commented on CASSANDRA-10532:
--------------------------------------------

While reviewing your latest patch I realised that some part of my previous 
comment were wrong.
I discussed the {{DELETE static_col FROM %s WHERE pk = ? AND ck = ? IF value = 
?}} query offline with [~slebresne] and there are clearly some case where it 
can be usefull.

My comment on the {{DELETE static_col FROM %s WHERE pk = ? IF value = ? AND 
static_col = ?}} is also wrong. The reason to reject the query is in fact that 
the primary key is not fully specified. 

I have pushed some new patches where I corrected the mistakes caused by my 
comments. Only 2.1 and 3.0 are different. Could you check that it is fine for 
you?
Sorry for that.
||Branch||utests||dtests||
|[2.1|https://github.com/apache/cassandra/compare/trunk...blerer:10532-2.1]|[2.1|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-2.1-testall/]|[2.1|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-2.1-dtest/]|
|[2.2|https://github.com/apache/cassandra/compare/trunk...blerer:10532-2.2]|[2.2|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-2.2-testall/]|[2.2|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-2.2-dtest/]|
|[3.0|https://github.com/apache/cassandra/compare/trunk...blerer:10532-3.0]|[3.0|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-3.0-testall/]|[3.0|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-3.0-dtest/]|
|[3.7|https://github.com/apache/cassandra/compare/trunk...blerer:10532-3.7]|[3.7|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-3.7-testall/]|[3.7|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-10532-3.7-dtest/]|

> Allow LWT operation on static column with only partition keys
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-10532
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10532
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>         Environment: C* 2.2.0
>            Reporter: DOAN DuyHai
>            Assignee: Carl Yeksigian
>             Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
>
> Schema
> {code:sql}
> CREATE TABLE IF NOT EXISTS achilles_embedded.entity_with_static_column(
> id bigint,
> uuid uuid,
> static_col text static,
> value text,
> PRIMARY KEY(id, uuid));
> {code}
> When trying to prepare the following query
> {code:sql}
> DELETE static_col FROM achilles_embedded.entity_with_static_column WHERE 
> id=:id_Eq IF static_col=:static_col;
> {code}
> I got the error *DELETE statements must restrict all PRIMARY KEY columns with 
> equality relations in order to use IF conditions, but column 'uuid' is not 
> restricted*
> Since the mutation only impacts the static column and the CAS check is on the 
> static column, it makes sense to provide only partition key



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to