You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ekaterina Dimitrova (Jira)" <ji...@apache.org> on 2022/09/20 19:03:00 UTC
[jira] [Commented] (CASSANDRA-17762) LWT IF col = NULL is inconsistent with SQL NULL
[ https://issues.apache.org/jira/browse/CASSANDRA-17762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607367#comment-17607367 ]
Ekaterina Dimitrova commented on CASSANDRA-17762:
-------------------------------------------------
I'll be looking into this one soon.
Reading here, it seems more or less there is some consensus but I guess I still need to send mail to the ML at least for awareness?
To summarize:
_Utilizing {{IS NULL}} and {{IS NOT NULL in LWT}} (in practice we need to do it everywhere including for column filtering (CASSANDRA-10715))._
_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._
_On one side to be consistent in CQL, on another consistent with SQL._
_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._
I guess the question is [~avi.kivity]'s point around NULL being valid in SQL. Shall we deal with the change of meaning for X = NULL as part of this ticket or just deprecate for now X = NULL and spin that part into another ticket? And still bring that to the mailing list...
There were a few discussions in parallel around CQL syntax lately so I hope I didn't miss any point here.
> 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
> Assignee: Ekaterina Dimitrova
> 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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org