cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Lerer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6237) Allow range deletions in CQL
Date Mon, 23 Mar 2015 10:02:13 GMT

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

Benjamin Lerer commented on CASSANDRA-6237:
-------------------------------------------

The current version of the patch can be found [here|https://github.com/apache/cassandra/compare/trunk...blerer:CASSANDRA-6237].
The first part of the patch is a refactoring of {{ModificationStatement}} and its two sub-classes
{{UpdateStatement}} and {{DeleteStatement}}. The refactoring replaces the code used to build
the restrictions in those classes to reuse {{StatementRestrictions}}.

The second part of the patch add to {{UPDATE}} and {{DELETE}} queries support for:
* {{IN}} restrictions on any partition key component
* {{IN}} restictions  on any clustering key 
* {{EQ}} and {{IN}} multi column restrictions on the clustering keys (mixed or not with single
column restrictions).

Side remark: {{IN}} restrictions are still not supported for conditional updates or deletes


The third part of the patch add support for range deletion of entire rows.

In this third part, I run into the issue that the serialization of {{RangeTombstone}} does
not support empty composite for the min bound. This cause problem for queries like: {{DELETE
* FROM partitionKey =  AND clusteringColumn <  ?;}}.

According to Sylvain this problem will be fixed as part of CASSANDRA-8099. So I will wait
for it to be committed before delivering the final patch for this ticket.

> Allow range deletions in CQL
> ----------------------------
>
>                 Key: CASSANDRA-6237
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6237
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Benjamin Lerer
>            Priority: Minor
>              Labels: cql, docs
>             Fix For: 3.0
>
>         Attachments: CASSANDRA-6237.txt
>
>
> We uses RangeTombstones internally in a number of places, but we could expose more directly
too. Typically, given a table like:
> {noformat}
> CREATE TABLE events (
>     id text,
>     created_at timestamp,
>     content text,
>     PRIMARY KEY (id, created_at)
> )
> {noformat}
> we could allow queries like:
> {noformat}
> DELETE FROM events WHERE id='someEvent' AND created_at < 'Jan 3, 2013';
> {noformat}



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

Mime
View raw message