You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Dmitry Sysolyatin (Jira)" <ji...@apache.org> on 2025/11/09 11:30:00 UTC
[jira] [Created] (CALCITE-7286) SqlToRelConverterTest.testJoinOnExists has wrong plan
Dmitry Sysolyatin created CALCITE-7286:
------------------------------------------
Summary: SqlToRelConverterTest.testJoinOnExists has wrong plan
Key: CALCITE-7286
URL: https://issues.apache.org/jira/browse/CALCITE-7286
Project: Calcite
Issue Type: Improvement
Reporter: Dmitry Sysolyatin
It looks like the plan for this test is missing variables set. The variable `$cor0` is used, but there’s no information about where it was defined.
{code}
<TestCase name="testJoinOnExists">
<Resource name="sql">
<![CDATA[select * from emp left join dept
on emp.empno = 1
or exists (select deptno from emp where empno > dept.deptno + 5)]]>
</Resource>
<Resource name="plan">
<![CDATA[
LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4], SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8], DEPTNO0=[$9], NAME=[$10])
LogicalJoin(condition=[OR(=($0, 1), EXISTS({
LogicalFilter(condition=[>($0, +($cor0.DEPTNO0, 5))])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
}))], joinType=[left])
LogicalTableScan(table=[[CATALOG, SALES, EMP]])
LogicalTableScan(table=[[CATALOG, SALES, DEPT]])
]]>
</Resource>
</TestCase>
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)