[
https://issues.redhat.com/browse/TEIID-5933?focusedWorklogId=12450808&...
]
Steven Hawkins logged work on TEIID-5933:
-----------------------------------------
Author: Steven Hawkins
Created on: 10/Apr/20 3:43 PM
Start Date: 10/Apr/20 3:43 PM
Worklog Time Spent: 3 hours
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 3 hours)
Time Spent: 3 hours
Worklog Id: (was: 12450808)
Nested left joins return wrong results
--------------------------------------
Key: TEIID-5933
URL:
https://issues.redhat.com/browse/TEIID-5933
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 13.1
Reporter: Dmitrii Pogorelov
Assignee: Steven Hawkins
Priority: Blocker
Fix For: 14.0, 13.0.3, 13.1.1
Original Estimate: 3 hours
Time Spent: 3 hours
Remaining Estimate: 0 minutes
Nested left joins in combination with a where x is null (on a left joined column) return
wrong results:
{code:sql}
-- 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 ;;
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)