[
https://issues.apache.org/jira/browse/CALCITE-6469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17882620#comment-17882620
]
Ruben Q L commented on CALCITE-6469:
------------------------------------
[~nobigo] was this a regression that appeared on 1.37 (which used to work fine
before), or not?
There is no PR here, and we are defining the scope for the next release 1.38,
coming soon. Can we consider pushing this forward? (remove the fixVersion=1.38)
> Join on condition generates wrong plan when the condition is IN sub-query
> -------------------------------------------------------------------------
>
> Key: CALCITE-6469
> URL: https://issues.apache.org/jira/browse/CALCITE-6469
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.37.0
> Reporter: xiong duan
> Assignee: xiong duan
> Priority: Major
> Fix For: 1.38.0
>
>
> Now Calcite will throw an exception when we execute the SQL:
> {code:java}
> select * from scott.bonus b left join scott.emp e on e.deptno in (select
> deptno from scott.dept b){code}
> I will try to rewrite this SQL become:
> {code:java}
> SELECT *
> FROM "SCOTT"."BONUS"
> LEFT JOIN ("SCOTT"."EMP" INNER JOIN (SELECT "DEPTNO"
> FROM "SCOTT"."DEPT"
> GROUP BY "DEPTNO") AS "t" ON "EMP"."DEPTNO" = "t"."DEPTNO") ON TRUE{code}
> The SQL :
> {code:java}
> select * from scott.emp e left join scott.bonus b on e.deptno in (select
> deptno from scott.dept b) {code}
> I will try to rewrite this SQL become:
> {code:java}
> SELECT *
> FROM "SCOTT"."EMP"
> LEFT JOIN ("SCOTT"."BONUS" CROSS JOIN (SELECT "DEPTNO"
> FROM "SCOTT"."DEPT"
> GROUP BY "DEPTNO") AS "t") ON "EMP"."DEPTNO" = "t"."DEPTNO" {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)