You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2014/03/24 21:50:43 UTC

[jira] [Updated] (HIVE-3892) auto sort merge join does not work for sub-queries

     [ https://issues.apache.org/jira/browse/HIVE-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated HIVE-3892:
-----------------------------------

    Fix Version/s: 0.11.0

> auto sort merge join does not work for sub-queries
> --------------------------------------------------
>
>                 Key: HIVE-3892
>                 URL: https://issues.apache.org/jira/browse/HIVE-3892
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>             Fix For: 0.11.0
>
>
> set hive.enforce.bucketing = true;
> set hive.enforce.sorting = true;
> set hive.exec.reducers.max = 1;
> CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS;
> CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS;
> insert overwrite table tbl1
> select * from src where key < 10;
> insert overwrite table tbl2
> select * from src where key < 10;
> set hive.auto.sort.merge.join=true;
> set hive.optimize.bucketmapjoin = true;
> set hive.optimize.bucketmapjoin.sortedmerge = true;
> set hive.auto.sort.merge.join.bigtbl.matcher = org.apache.hadoop.hive.ql.optimizer.SizeSortMergeJoinBigTableMatcher;
> -- The join is being performed in sub-query. It should be converted to a sort-merge join
> explain
> select count(*) from (
>   select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key
> ) subq1;
> Even after HIVE-3403, the test above does not convert to a sort-merge join.



--
This message was sent by Atlassian JIRA
(v6.2#6252)