pypika icon indicating copy to clipboard operation
pypika copied to clipboard

Bug in filtering None values

Open ChillarAnand opened this issue 2 years ago • 1 comments

When a filter value is None, pypika should generate query as WHERE name is NULL instead of WHERE "name"=NULL.

Screenshot 2022-02-25 at 13 46 30

ChillarAnand avatar Feb 25 '22 08:02 ChillarAnand

WHERE "name"=NULL is always going to be Falsy since NULL = NULL will always be falsy (why? best put by Matt as "I don't have a sister, and nor does my friend. If "NULL = NULL" then we have a common sister, and are therefore related!" here). Also, for reference this Wiki page on NULL -> https://en.wikipedia.org/wiki/Null_%28SQL%29#Controversy

gavindsouza avatar Feb 28 '22 07:02 gavindsouza