You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Harish Butani (JIRA)" <ji...@apache.org> on 2013/10/31 18:27:22 UTC

[jira] [Created] (HIVE-5709) Extend Join merging logic to merge 2 Joins when one Join expression list is a subset of the other.

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)