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

Sylvain Lebresne commented on CASSANDRA-6599:
---------------------------------------------

bq. I have a minor preference for simply allowing nulls as map values

I'm good adding nulls for map values though for the record, let me note that up 
until protocol v3 there is no way to serialize collections with nulls inside 
(so this won't be useful for v1/v2 drivers when using prepared statement). It's 
ok since this ticket is targeted at 2.1, again, just mentioning it for the 
record.

Though for what it's worth I wouldn't personally mind supporting the {{..map - 
\{2, 3\}...}} syntax either: yes, it's subtracting a set to a map, but it feel 
intuitive enough to me to not be confusing and I can see it as reasonable 
syntactic sugar. 

> 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, 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)

Reply via email to