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

Namit Jain commented on HIVE-1276:
----------------------------------

set hive.enforce.bucketing = true;
set hive.exec.reducers.max = 1;

drop table bucket5_1;
CREATE TABLE bucket5_1(key int, value string) CLUSTERED BY (key) INTO 2 BUCKETS;

explain extended
insert overwrite table bucket5_1
select * from src cluster by key;

insert overwrite table bucket5_1
select * from src cluster by key;

select * from bucket5_1;

drop table bucket5_1;



Look at the above test: it should be executed as a single map-reduce job

> optimize bucketing 
> -------------------
>
>                 Key: HIVE-1276
>                 URL: https://issues.apache.org/jira/browse/HIVE-1276
>             Project: Hadoop Hive
>          Issue Type: Improvement
>            Reporter: Namit Jain
>            Assignee: He Yongqiang
>
> If the query results are already clustered by the bucketing column, there is 
> no need for another map-reduce job.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to