-
Bug
-
Resolution: Done
-
Blocker
-
13.1
-
None
-
DV Sprint 62
-
0.5
-
Nested left joins in combination with a where x is null (on a left joined column) return wrong results:
-- wrong result SELECT * FROM test_dwh_pg.test_1 a LEFT JOIN ( SELECT x.c1 FROM test_dwh_pg.test_2 x LEFT JOIN (SELECT * FROM test_dwh_pg.test_3 WHERE c1 <> '123') y ON x.c1 = y.c1 WHERE y.c1 IS NULL ) b ON a.c1 = b.c1 WHERE b.c1 IS NULL ;; -- correct result SELECT * FROM test_dwh_pg.test_1 a LEFT JOIN ( SELECT x.c1 FROM test_dwh_pg.test_2 x LEFT JOIN (SELECT * FROM test_dwh_pg.test_3 WHERE c1 <> '123') y ON x.c1 = y.c1 WHERE y.c1 IS NULL LIMIT 1000000000 ) b ON a.c1 = b.c1 WHERE b.c1 IS NULL ;;