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

Avi Kivity commented on CASSANDRA-17762:
----------------------------------------

{{WHERE}} is protected by a grammar limitation:

 
{noformat}
cassandra@cqlsh> select * from system.local where key = null ALLOW FILTERING;
InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid 
null value in condition for column key"
cassandra@cqlsh> select * from system.local where data_center = null ALLOW 
FILTERING;
InvalidRequest: Error from server: code=2200 [Invalid query] 
message="Unsupported null value for column data_center"{noformat}
Although there's a good chance it will fail with a NULL supplied via a bind 
variable.

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to