Aihua Xu created HIVE-10702:
-------------------------------

             Summary: COUNT(*) over windowing 'x preceding and y preceding' 
doesn't work properly
                 Key: HIVE-10702
                 URL: https://issues.apache.org/jira/browse/HIVE-10702
             Project: Hive
          Issue Type: Sub-task
            Reporter: Aihua Xu
            Assignee: Aihua Xu


Given the following query:
{noformat}
select ts, f, count(*) over (partition by ts order by f rows between 2 
preceding and 1 preceding) from over10k limit 100;
{noformat}

It returns the result 
{noformat}
2013-03-01 09:11:58.70307       3.17    0
2013-03-01 09:11:58.70307       10.89   0
2013-03-01 09:11:58.70307       14.54   1
2013-03-01 09:11:58.70307       14.78   1
2013-03-01 09:11:58.70307       17.85   1
2013-03-01 09:11:58.70307       20.61   1
2013-03-01 09:11:58.70307       28.69   1
2013-03-01 09:11:58.70307       29.22   1
2013-03-01 09:11:58.70307       31.17   1
2013-03-01 09:11:58.70307       38.35   1
2013-03-01 09:11:58.70307       38.61   1
{noformat}

Mostly it should return count 2 rather than 1.



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

Reply via email to