Mihai Budiu created CALCITE-7882:
------------------------------------

             Summary: JOIN ON condition with an uncorrelated sub-query followed 
by a correlated EXISTS fails with "Unable to implement"
                 Key: CALCITE-7882
                 URL: https://issues.apache.org/jira/browse/CALCITE-7882
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.42.0
            Reporter: Mihai Budiu


Here is the expected output as a quidem test:

{code}
!use scott
!set outputformat mysql
select e.ename
from emp as e join dept as d
on e.deptno = d.deptno
  and e.sal < (select max(s.sal) from emp as s)
  and exists (select 1 from emp as s where s.mgr = e.empno)
order by e.ename;
+-------+
| ENAME |
+-------+
| BLAKE |
| CLARK |
| FORD  |
| JONES |
| SCOTT |
+-------+
(5 rows)
{code}

 



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to