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

Namit Jain commented on HIVE-3763:
----------------------------------

This is independent of HIVE-3633.

Even a simple query like:

SELECT /*+mapjoin(b)*/ count(*) FROM test_table1 a JOIN test_table2 b ON a.key 
= b.key;

requires 2 MR jobs, if test_table1 and test_table2 are sorted and bucketed by 
key
                
> Aggregation followed by a sort-merge join requires a new MR job
> ---------------------------------------------------------------
>
>                 Key: HIVE-3763
>                 URL: https://issues.apache.org/jira/browse/HIVE-3763
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>
> After Hive-3633, if tbl1 and tbl2 are tables bucketiezed and sorted by key 
> into 2 buckets, the following query:
>       
>       
> select count(*) from (        
>   select /*+mapjoin(a)*/ a.key as key, a.value as val1, b.value as val2 from 
> tbl1 a join tbl2 b on a.key = b.key
> ) subq1;      
> requires 2 MR job - the first one is a sort-merge join, and the second MR job
> performs the count(*) on the output of the sort-merge join. 
> Ideally, this should be performed in a single MR job.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to