Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A444211767 for ; Tue, 26 Aug 2014 15:16:58 +0000 (UTC) Received: (qmail 66786 invoked by uid 500); 26 Aug 2014 15:16:58 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 66755 invoked by uid 500); 26 Aug 2014 15:16:58 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 66743 invoked by uid 99); 26 Aug 2014 15:16:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2014 15:16:58 +0000 Date: Tue, 26 Aug 2014 15:16:58 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-6599) CQL updates should support "column = column - { key1, key2, ... }" syntax for removing map elements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-6599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-6599: ---------------------------------------- Attachment: 6599-v2.txt So looking back at the patch to support deletion by a set, I'm no sure of the reason for the changes to {{Sets.java}} but it make us incorrectly accept things like {{s = s + \{'a' : 'b'\}}} where {{s}} is a set (which triggers some AssertionError) and it breaks the empty map (as shown by the failure of the {{map_test}} in dtests). Attaching a v2 that remove those changes, pass the proper type when preparing the value in {{Operation.Substraction}} and a few additional tests. > CQL updates should support "column = column - { key1, key2, ... }" syntax for removing map elements > --------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-6599 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6599 > Project: Cassandra > Issue Type: Wish > Reporter: Gavin > Assignee: Benjamin Lerer > Priority: Minor > Labels: cql > Fix For: 2.1.1 > > Attachments: 6599-proto.txt, 6599-v2.txt, CASSANDRA-6599.txt > > > A variable number number of elements can be removed from lists and sets using an update statement of the form "update .... set column=column - {....} where ...". This syntax should also be supported for map columns. This would be especially useful for prepared statements (I know that you can use "set column[...] = null" to remove items in an update statement, but that only works for one element at a time). -- This message was sent by Atlassian JIRA (v6.2#6252)