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

Aman Sinha commented on DRILL-512:
----------------------------------

For comparison purposes, note that the following simplified version of Tpch 
02.sql does decorrelate.  It has the same correlation predicate and subquery 
pattern.  The difference is in the number of other joins in the outer query and 
subquery. 
select
  p.p_partkey,
  p.p_mfgr
from
  cp.`tpch/part.parquet` p,
  cp.`tpch/partsupp.parquet` ps1
where
  p.p_partkey = ps1.ps_partkey
  and p.p_size = 41
  and ps1.ps_supplycost = (
    select
      min(ps.ps_supplycost)
    from
      cp.`tpch/partsupp.parquet` ps
    where
      p.p_partkey = ps.ps_partkey
  )
;

> Tpch2 fails to decorrelate
> --------------------------
>
>                 Key: DRILL-512
>                 URL: https://issues.apache.org/jira/browse/DRILL-512
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jacques Nadeau
>
> On top of Optiq 0.6, TPCH2 fails to remove the CorrelatorRel from the logical 
> plan.  Line 1091 of RelDecorrelator is supposed to be populating the map 
> between correlation variables and output positions.  It doesn't look like 
> that is happening.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to