hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aihua Xu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-12881) Count() function over partitions doesn't work properly with ORDER BY
Date Fri, 15 Jan 2016 20:59:40 GMT
Aihua Xu created HIVE-12881:
-------------------------------

             Summary: 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)

Mime
View raw message