Describe the bug
As seen in the query below, we currently only take column nullability into consideration when planning joins instead of full expression nullability, in cases where we join on an expression that might introduce nulls.
To Reproduce
CREATE TABLE outer_t(id VARCHAR NOT NULL) AS VALUES ('z');
CREATE TABLE inner_t(id VARCHAR NOT NULL) AS VALUES ('a');
SELECT id
FROM outer_t
WHERE (NULLIF(id, 'z') NOT IN (SELECT id FROM inner_t)) IS NULL;
Expected behavior
The query above currently returns no results, but should return a single row with the value z (verified with DuckDB).
Additional context
No response
Describe the bug
As seen in the query below, we currently only take column nullability into consideration when planning joins instead of full expression nullability, in cases where we join on an expression that might introduce nulls.
To Reproduce
Expected behavior
The query above currently returns no results, but should return a single row with the value
z(verified with DuckDB).Additional context
No response