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

Jonathan Ellis commented on CASSANDRA-7304:
-------------------------------------------

I'm not a fan of flags or USING modifiers that "mutate" the semantics of a 
statement.  Much better to have straightforward semantics that say what they 
want the first time around.  So -1 on IGNORE NULLS from me.

I'm also -0 on adding an UNSET keyword.  If you don't want to set it, just 
leave it out.  However, recognizing that is not always desirable with prepared 
statements, I like [~jjordan]'s suggestion of allowing unset bind variables to 
simply be ignored.  So a statement of {{SET x = :x, y = :y}} with only :x 
bound, would ignore :y.

I note that currently this would not work with the Java driver since it 
defaults unbound variables to NULL.  However, this is clearly broken behavior 
on the Java driver's part that should be fixed anyway.

> Ability to distinguish between NULL and UNSET values in Prepared Statements
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-7304
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7304
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Drew Kutcharian
>         Attachments: 7304.patch
>
>
> Currently Cassandra inserts tombstones when a value of a column is bound to 
> NULL in a prepared statement. At higher insert rates managing all these 
> tombstones becomes an unnecessary overhead. This limits the usefulness of the 
> prepared statements since developers have to either create multiple prepared 
> statements (each with a different combination of column names, which at times 
> is just unfeasible because of the sheer number of possible combinations) or 
> fall back to using regular (non-prepared) statements.
> This JIRA is here to explore the possibility of either:
> A. Have a flag on prepared statements that once set, tells Cassandra to 
> ignore null columns
> or
> B. Have an "UNSET" value which makes Cassandra skip the null columns and not 
> tombstone them
> Basically, in the context of a prepared statement, a null value means delete, 
> but we don’t have anything that means "ignore" (besides creating a new 
> prepared statement without the ignored column).
> Please refer to the original conversation on DataStax Java Driver mailing 
> list for more background:
> https://groups.google.com/a/lists.datastax.com/d/topic/java-driver-user/cHE3OOSIXBU/discussion



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to