[ 
https://issues.apache.org/jira/browse/CALCITE-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15097132#comment-15097132
 ] 

Maryann Xue commented on CALCITE-1055:
--------------------------------------

No. This one was broken by CALCITE-816. We test correlated subqueries 
un-decorrelated in order to verify that runtime of nested loop join and they 
always worked. CALCITE-559 might be dup of CALCITE-864, which is "correlated 
subquery" + "join".

> 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)

Reply via email to