You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Aihua Xu (JIRA)" <ji...@apache.org> on 2016/01/15 22:46:39 UTC

[jira] [Resolved] (HIVE-12881) Count() function over partitions doesn't work properly with ORDER BY

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

Aihua Xu resolved HIVE-12881.
-----------------------------
    Resolution: Not A Problem

> Count() function over partitions doesn't work properly with ORDER BY 
> ---------------------------------------------------------------------
>
>                 Key: HIVE-12881
>                 URL: https://issues.apache.org/jira/browse/HIVE-12881
>             Project: Hive
>          Issue Type: Bug
>          Components: PTF-Windowing
>    Affects Versions: 2.1.0
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>
> The following query doesn't seem to return the correct result.
> {noformat}
> create table test (empno string, deptno string, level string, manager string);
> insert into test values ('1', '2', 'B', 'Else'); 
> insert into test values ('1', '2', 'B', 'Else');
> insert into test values ('2', '2', 'B', 'Other');
> select  count( manager) over (partition by deptno, level order by manager) from test; 
> {noformat}
> It  returns 
> {noformat}
> 2
> 2
> 3
> {noformat}
> Without ORDER BY, it returns correct result
> {noformat}
> 3
> 3
> 3
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)