[ https://issues.apache.org/jira/browse/CALCITE-1055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-1055: --------------------------------- Summary: SqlToRelConverter should create Correlate, not Join, for correlated sub-queries (was: Correlate rel instead of Join rel should be created for correlated subqueries before decorrelation) > SqlToRelConverter should create Correlate, not Join, for correlated > sub-queries > ------------------------------------------------------------------------------- > > 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, CALCITE-1055_2.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)