Skip to content

Fix NULL handling for NOT IN subquery #1898

@yew1eb

Description

@yew1eb

NOT IN subquery returns incorrect non-empty result when subquery contains NULL

Reproduction

CREATE TEMP VIEW tbl AS SELECT * FROM VALUES (1,1), (2,2), (3,NULL) AS t(a,b);
SELECT * FROM tbl WHERE a NOT IN (SELECT b FROM tbl);

Expected

Empty result set

Actual

Non-empty result set (incorrect).

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctnessa query provides different output from spark

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions