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-5709) Extend Join merging logic to merge 2 Joins when one Join expression list is a subset of the other.
Date Thu, 31 Oct 2013 17:27:22 GMT
Harish Butani created HIVE-5709:
-----------------------------------

             Summary: Extend Join merging logic to merge 2 Joins when one Join expression
list is a subset of the other.
                 Key: HIVE-5709
                 URL: https://issues.apache.org/jira/browse/HIVE-5709
             Project: Hive
          Issue Type: Improvement
          Components: Query Processor
            Reporter: Harish Butani


As pointed out by [~ashutoshc] here: https://reviews.apache.org/r/14953/

For the following query

{noformat}
select p1.name, p2.name, p3.name
from part p1 join p2 on p1.name = p2.name and p1.key = p2.key join 
part p3 on p1.name = p3.name
{noformat}

2 jobs are generated:
- p1 join p2 on name, key
- join p3 on name

This can be done as:
- 1 3-way join of p1,p2,p3 on name
- followed by a Filter on p1.key = p2.key

This is valid only for inner joins. 
This can be done by extending the Merge Join logic to check for a subset relation between
2 QBJoinTree expression lists. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message