You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Oded Peer (JIRA)" <ji...@apache.org> on 2016/07/18 18:35:20 UTC

[jira] [Comment Edited] (CASSANDRA-11424) Option to leave omitted columns in INSERT JSON unset

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

Oded Peer edited comment on CASSANDRA-11424 at 7/18/16 6:34 PM:
----------------------------------------------------------------

Thank you for the review Sylvain.
It's a great learning experience for me and it will help me do better on my next patch  - 
I wasn't aware of the of the .rst documentation in the source tree.
I was glad to learn the syntax in your patch for {code}( { defaultUnset = true; } K_UNSET) ){code}Not knowing this lead to changes in the QueryOptions which is far less elegant than what you propose.

Of course I am happy with it.



was (Author: odpeer):
Thank you for the review Sylvain.
It's a great learning experience for me and it will help me do better on my next patch  - 
I wasn't aware of the of the .rst documentation in the source tree.
I was glad to learn the syntax in your patch for {code}( { defaultUnset = true; } K_UNSET) ){code}. Not knowing this lead to changes in the QueryOptions which is far less elegant than what you propose.

Of course I am happy with it.


> Option to leave omitted columns in INSERT JSON unset
> ----------------------------------------------------
>
>                 Key: CASSANDRA-11424
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11424
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Ralf Steppacher
>            Assignee: Oded Peer
>              Labels: client-impacting, cql
>             Fix For: 3.8
>
>         Attachments: 11424-trunk-V1.txt, 11424-trunk-V2.txt, 11424-trunk-V3.txt
>
>
> CASSANDRA-7304 introduced the ability to distinguish between {{NULL}} and {{UNSET}} prepared statement parameters.
> When inserting JSON objects it is not possible to profit from this as a prepared statement only has one parameter that is bound to the JSON object as a whole. There is no way to control {{NULL}} vs {{UNSET}} behavior for columns omitted from the JSON object.
> Please extend on CASSANDRA-7304 to include JSON support.
> {color:grey}
> (My personal requirement is to be able to insert JSON objects with optional fields without incurring the overhead of creating a tombstone of every column not covered by the JSON object upon initial(!) insert.)
> {color}



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