You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/01/13 22:37:39 UTC
[jira] [Commented] (CALCITE-1055) Correlate rel instead of Join rel
should be created for correlated subqueries before decorrelation
[ https://issues.apache.org/jira/browse/CALCITE-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097042#comment-15097042 ]
Julian Hyde commented on CALCITE-1055:
--------------------------------------
Is this a duplicate of CALCITE-559? Its test case JdbcTest.testJoinCorreScalarSubQ looks very similar.
> Correlate rel instead of Join rel should be created for correlated subqueries before decorrelation
> --------------------------------------------------------------------------------------------------
>
> Key: CALCITE-1055
> URL: https://issues.apache.org/jira/browse/CALCITE-1055
> Project: Calcite
> Issue Type: Bug
> Reporter: Maryann Xue
> Assignee: Maryann Xue
> Fix For: 1.6.0
>
> Attachments: CALCITE-1055.patch
>
>
> In some cases of FILTER correlated subqueries, the "variablesSet" didn't get passed down to RelBuilder.join() and thus a Join rel was created while it should have been a Correlate rel.
> For example,
> {code}
> select order_id, quantity from orders o
> where quantity = (
> select max(quantity) from orders o2
> where o.item_id = o2.item_id)
> {code}
> Does the same apply to PROJECT and JOIN subqueries, [~julianhyde] ?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)