You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nikolai Grigoriev (JIRA)" <ji...@apache.org> on 2014/08/09 04:18:12 UTC
[jira] [Commented] (CASSANDRA-6173) Unable to delete multiple
entries using In clause on clustering part of compound key
[ https://issues.apache.org/jira/browse/CASSANDRA-6173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14091595#comment-14091595 ]
Nikolai Grigoriev commented on CASSANDRA-6173:
----------------------------------------------
In the absence of range-based deletes (because deleting of a slice is not supported) this option is quite important for some data structures. I have just hit a case myself when I need to delete a slice of columns (range of last component of the clustering key in CQL terms). So, first I have found that deleting a slice is not possible (CASSANDRA-494) - so I need to first read the list of values to delete them :) And then I have found that for each value I will be issuing a delete statement :(
> Unable to delete multiple entries using In clause on clustering part of compound key
> ------------------------------------------------------------------------------------
>
> Key: CASSANDRA-6173
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6173
> Project: Cassandra
> Issue Type: New Feature
> Components: Core
> Reporter: Ashot Golovenko
> Priority: Minor
>
> I have the following table:
> CREATE TABLE user_relation (
> u1 bigint,
> u2 bigint,
> mf int,
> i boolean,
> PRIMARY KEY (u1, u2));
> And I'm trying to delete two entries using In clause on clustering part of compound key and I fail to do so:
> cqlsh:bm> DELETE from user_relation WHERE u1 = 755349113 and u2 in (100003404014120, 100002537242743);
> Bad Request: Invalid operator IN for PRIMARY KEY part u2
> Although the select statement works just fine:
> cqlsh:bm> select * from user_relation WHERE u1 = 755349113 and u2 in (100003404014120, 100002537242743);
> u1 | u2 | i | mf
> -----------+-----------------+------+----
> 755349113 | 100002537242743 | null | 27
> 755349113 | 100003404014120 | null | 0
> (2 rows)
--
This message was sent by Atlassian JIRA
(v6.2#6252)