I try a query which test NULL NOT IN Empty_Relation on Postrgresql, Spark and I got different results.
select count(*) from
(select 1)
where null not in
(a empty relation)
Postgresql outputs 1. The other outputs 0.
I understand the NULL behaviour of NOT IN, but my the subquery is empty relation, this situation seems more interesting. There are a lot of posts discussing NOT IN but I don't find anything related to NOT IN Empty_Relation.
So my question is more like does ANSI SQL define this behavior or this is actually a grey area, both answers could be accepted.