[
https://issues.apache.org/jira/browse/CASSANDRA-6237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14379081#comment-14379081
]
Jim Witschey edited comment on CASSANDRA-6237 at 3/25/15 1:13 AM:
------------------------------------------------------------------
How are range deletions expected to interact with batches? I have a dtest
[here|https://github.com/riptano/cassandra-dtest/blob/0d50f835c26bfcb71164a64fb1b80f4c3022e0b9/range_deletion_test.py#L63]
with a batch that succeeds:
{code}
BEGIN BATCH
DELETE FROM test WHERE partition_key = 1
DELETE FROM test WHERE partition_key = 2 AND i IN (0, 4)
APPLY BATCH;
{code}
and another
[here|https://github.com/riptano/cassandra-dtest/blob/0d50f835c26bfcb71164a64fb1b80f4c3022e0b9/range_deletion_test.py#L95]
with a batch that errors out:
{code}
BEGIN BATCH
DELETE FROM test WHERE partition_key = 2 AND i >= 3
APPLY BATCH;
{code}
I think the problem statement is the inequality.
The error on the dtest side is
{code}
ServerError: <ErrorMessage code=0000 [Server error]
message="java.lang.UnsupportedOperationException">
{code}
was (Author: mambocab):
How are range deletions expected to interact with batches? I have a dtest
[here|https://github.com/riptano/cassandra-dtest/blob/0d50f835c26bfcb71164a64fb1b80f4c3022e0b9/range_deletion_test.py#L63]
with a batch that succeeds:
{code}
BEGIN BATCH
DELETE FROM test WHERE partition_key = 1
DELETE FROM test WHERE partition_key = 2 AND i IN (0, 4)
APPLY BATCH;
{code}
and another
[here|https://github.com/riptano/cassandra-dtest/blob/0d50f835c26bfcb71164a64fb1b80f4c3022e0b9/range_deletion_test.py#L95]
with a batch that errors out:
{code}
BEGIN BATCH
DELETE FROM test WHERE partition_key = 2 AND i >= 3
APPLY BATCH;
{code}
The error on the dtest side is
{code}
ServerError: <ErrorMessage code=0000 [Server error]
message="java.lang.UnsupportedOperationException">
{code}
> 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)