Consider a table with a double column with some NaN values.The following queries return inconsistent results. not (val between 1 and 3)
when used as a filter excludes NaN rows, but when used as a projection returns true
.
presto:tpch> select * from nan;
val
-----
NaN
(1 row)
presto:tpch> select * from nan where not (val between 1 and 3);
val
-----
(0 rows)
presto:tpch> select not (val between 1 and 3) from nan;
_col0
-------
true
(1 row)