panbingkun commented on PR #48261:
URL: https://github.com/apache/spark/pull/48261#issuecomment-2378262352

   > > Yea I think this is common sense. Do other systems have `array_contains` 
function and how do they handle null?
   > 
   > Current behavior seems to match how we handle IN lists (and those are in 
the SQL standard): select null in (1, 2, null); -- returns NULL, not true.
   > 
   > Fundamentally, if array_contains() uses equality to establish whether an 
element belongs to an array, then NULL = NULL returns NULL, not true.
   > 
   > See also 
https://docs.databricks.com/en/sql/language-manual/functions/array_contains.html#examples
   
   This is really `a rule` that goes against common sense, and I believe most 
data processors will be troubled by this rule.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to