[
https://issues.apache.org/jira/browse/CASSANDRA-5708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13931204#comment-13931204
]
Tyler Hobbs commented on CASSANDRA-5708:
----------------------------------------
There's one scenario where I'm not sure what the best behavior would be:
{noformat}
CREATE TABLE foo (k int PRIMARY KEY, v int);
INSERT INTO foo (k, v) VALUES (0, 0);
DELETE v FROM foo WHERE k=0 IF EXISTS; -- cas succeeds
DELETE v FROM foo WHERE k=0 IF EXISTS; -- cas fails
DELETE FROM foo WHERE k=0 IF EXISTS; -- cas succeeds
{noformat}
When deleting a set of columns (instead of the entire row), should EXISTS only
check to see if any of the deleted cells are live, or should it check to see if
the entire row has any live cells? (I think the latter behavior is less
surprising.)
> Add DELETE ... IF EXISTS to CQL3
> --------------------------------
>
> Key: CASSANDRA-5708
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5708
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Sylvain Lebresne
> Assignee: Tyler Hobbs
> Priority: Minor
> Fix For: 2.0.7
>
>
> I've been slightly lazy in CASSANDRA-5443 and didn't added a {{DELETE .. IF
> EXISTS}} syntax to CQL because it wasn't immediately clear what was the
> correct condition to use for the "IF EXISTS". But at least for CQL3 tables,
> this is in fact pretty easy to do using the row marker so we should probably
> add it.
--
This message was sent by Atlassian JIRA
(v6.2#6252)