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

Hudson commented on HIVE-4096:
------------------------------

Integrated in Hive-trunk-hadoop2 #138 (See 
[https://builds.apache.org/job/Hive-trunk-hadoop2/138/])
    HIVE-4096. problem in hive.map.groupby.sorted with distincts. (njain via 
kevinwilfong) (Revision 1455650)

     Result = FAILURE
kevinwilfong : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1455650
Files : 
* 
/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/GroupByOptimizer.java
* /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
* /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/GroupByDesc.java
* /hive/trunk/ql/src/test/queries/clientpositive/groupby_sort_8.q
* /hive/trunk/ql/src/test/results/clientpositive/groupby_sort_8.q.out

                
> problem in hive.map.groupby.sorted with distincts
> -------------------------------------------------
>
>                 Key: HIVE-4096
>                 URL: https://issues.apache.org/jira/browse/HIVE-4096
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Namit Jain
>         Attachments: hive.4096.1.patch
>
>
> set hive.enforce.bucketing = true;
> set hive.enforce.sorting = true;
> set hive.exec.reducers.max = 10;
> set hive.map.groupby.sorted=true;
> CREATE TABLE T1(key STRING, val STRING) PARTITIONED BY (ds string)
> CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS STORED AS TEXTFILE;
> LOAD DATA LOCAL INPATH '../data/files/T1.txt' INTO TABLE T1 PARTITION 
> (ds='1');
> -- perform an insert to make sure there are 2 files
> INSERT OVERWRITE TABLE T1 PARTITION (ds='1') select key, val from T1 where ds 
> = '1';
> CREATE TABLE outputTbl1(cnt INT);
> -- The plan should be converted to a map-side group by, since the
> -- sorting columns and grouping columns match, and all the bucketing columns
> -- are part of sorting columns
> EXPLAIN
> select count(distinct key) from T1;
> select count(distinct key) from T1;
> explain
> INSERT OVERWRITE TABLE outputTbl1
> select count(distinct key) from T1;
> INSERT OVERWRITE TABLE outputTbl1
> select count(distinct key) from T1;
> SELECT * FROM outputTbl1;
> DROP TABLE T1;
> The above query gives wrong results

--
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