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

Benjamin Lerer commented on CASSANDRA-17762:
--------------------------------------------

{quote}I'd be in favor of keeping the new syntax in line w/ SQL\{quote}

Even without looking at SQL we are also not consistent within CQL where we use 
x {{= null}} and  x != null for LWT but {{IS NOT NULL}} for Materialized views.

Utilizing {{IS NULL}} and {{IS NOT NULL}} everywhere including for column 
filtering (CASSANDRA-10715) make total sense in my opinion.

It should also be easy to support both syntaxes (\{{x = null}}/\{{X IS NULL}}) 
while warning the user that the first syntax is deprecated until the next major 
release.

 

> LWT IF col = NULL is inconsistent with SQL NULL
> -----------------------------------------------
>
>                 Key: CASSANDRA-17762
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17762
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL/Semantics
>            Reporter: Avi Kivity
>            Priority: Normal
>             Fix For: 4.x
>
>
> In SQL, any comparison with NULL is NULL, which is interpreted as FALSE in a 
> condition. To test for NULLness, you use IS NULL or IS NOT NULL.
> But LWT uses IF col = NULL as a NULLness test. This is likely to confuse 
> people coming from SQL and hamper attempts to extend the dialect.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to