You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Aman Sinha (JIRA)" <ji...@apache.org> on 2015/04/28 20:22:05 UTC

[jira] [Updated] (DRILL-2479) Correlated EXISTS containing an IN subquery fails to plan

     [ https://issues.apache.org/jira/browse/DRILL-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aman Sinha updated DRILL-2479:
------------------------------
    Attachment: 0001-DRILL-2479-Added-test-case-for-correlated-EXISTS-wit.patch

Added unit test case (fix is in Calcite). 

> Correlated EXISTS containing an IN subquery fails to plan
> ---------------------------------------------------------
>
>                 Key: DRILL-2479
>                 URL: https://issues.apache.org/jira/browse/DRILL-2479
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.8.0
>            Reporter: Aman Sinha
>            Assignee: Aman Sinha
>             Fix For: 0.9.0
>
>         Attachments: 0001-DRILL-2479-Added-test-case-for-correlated-EXISTS-wit.patch
>
>
> The following correlated EXISTS query gives a CannotPlanException : 
> {code}
>  select count(*) from lineitem l where exists (select ps.ps_suppkey from partsupp ps where ps.ps_suppkey = l.l_suppkey and ps.ps_partkey in (select p.p_partkey from part p));
> {code}
> The query succeeds if the IN clause in the EXISTS subquery is removed or replaced with an IN list of constants.  It also succeeds on the latest version of Calcite.  Drill is quite out of date with Calcite and there were decorrelation related changes in Calcite sometime mid to late 2014.  This issue should get resolved once Drill is rebased on recent Calcite. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)