Affects Version/s: None
Fix Version/s: None
A scalar sub-query that returns 0 rows should become a NULL value. Currently it removes the whole row. For example,
select ename, deptno, (select name from dept where deptno = emp.deptno)
should return a row 'Fred, 20, null' but that row is missing.
The problem is that scalar sub-query is translated to a left join, and left join is incorrectly implemented as inner join.