hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harish Butani (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-8558) CBO: enable n-way joins after CBO join reordering
Date Wed, 22 Oct 2014 06:25:34 GMT
Harish Butani created HIVE-8558:
-----------------------------------

             Summary: CBO: enable n-way joins after CBO join reordering
                 Key: HIVE-8558
                 URL: https://issues.apache.org/jira/browse/HIVE-8558
             Project: Hive
          Issue Type: Bug
            Reporter: Harish Butani
            Assignee: Harish Butani


With CBO, we disable n-way joins.  But for consecutive tables we can safely collapse into
n-way joins. For e.g this is safe to collapse:

{code}
select p1.p_name, p2.p_name, p3.p_name from part p1 join part p2 on p1.p_name = p2.p_name
join part p3 on p3.p_name = p1.p_name;
{code}

whereas, we shouldn't reorder in this case:

{code}
select p1.p_name, p2.p_name, p3.p_name 
from part p1 join part p2 on p1.p_name = p2.p_name join part p3 on p3.p_size = p1.p_size and
p3.p_size = p2.p_size join part p4 on p1.p_name = p4.p_name;
{code}



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

Mime
View raw message