You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Ivan Pavlov (JIRA)" <ji...@apache.org> on 2015/10/23 15:21:27 UTC

[jira] [Created] (DRILL-3969) TPCH Q2 fails during planning

Ivan Pavlov created DRILL-3969:
----------------------------------

             Summary: TPCH Q2 fails during planning
                 Key: DRILL-3969
                 URL: https://issues.apache.org/jira/browse/DRILL-3969
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.2.0
            Reporter: Ivan Pavlov


The following query (based on TPCH data) works fine, but if I un-comment the commented line at the bottom (i.e. _and r1.r_name = 'EUROPE'_) it fails with 

"UNSUPPORTED_OPERATION ERROR: This query cannot be planned possibly due to either a cartesian join or an inequality join"

{code:sql}
select s.s_acctbal, s.s_name, p.p_partkey, p.p_mfgr, s.s_address, s.s_phone
from
dfs.data.Part p, dfs.data.Supplier s, dfs.data.Partsupp ps, dfs.data.Nation n, dfs.data.Region r
where
p.p_partkey = ps.ps_partkey
and s.s_suppkey = ps.ps_suppkey
and p.p_size = 1
and p.p_type like '%STEEL'
and s.s_nationkey = n.n_nationkey
and n.n_regionkey = r.r_regionkey
and r.r_name = 'EUROPE'
and ps.ps_supplycost = (
    select min(ps1.ps_supplycost)
    from
    dfs.data.Partsupp ps1, dfs.data.Supplier s1, dfs.data.Nation n1, dfs.data.Region r1
    where
    ps.ps_partkey = ps1.ps_partkey
    and s1.s_suppkey = ps1.ps_suppkey
    and s1.s_nationkey = n1.n_nationkey
    and n1.n_regionkey = r1.r_regionkey
--    and r1.r_name = 'EUROPE'
)
{code}



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