You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2015/05/13 21:53:00 UTC

[jira] [Comment Edited] (HIVE-10650) Improve sum() function over windowing to support additional range formats

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

Ashutosh Chauhan edited comment on HIVE-10650 at 5/13/15 7:52 PM:
------------------------------------------------------------------

Hey [~aihuaxu] I see that you have deleted
{code}
select f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100;
{code}
But you have added same query with additional projection of ts in another q file. But, results are quite different. This led me to think if we had bug in current Hive and have wrong results checked in. I then tested this query and others you have in patch on postgres and results matched with what you have. So,  it seems like we have a correctness bug in current trunk, which this patch is fixing. Is that correct?

I am still going through code changes.


was (Author: ashutoshc):
Hey [~aihuaxu] I see that you have deleted
{code : sql}
select f, sum(f) over (partition by ts order by f rows between 2 preceding and 1 preceding) from over10k limit 100;
{code}
But you have added same query with additional projection of ts in another q file. But, results are quite different. This led me to think if we had bug in current Hive and have wrong results checked in. I then tested this query and others you have in patch on postgres and results matched with what you have. So,  it seems like we have a correctness bug in current trunk, which this patch is fixing. Is that correct?

I am still going through code changes.

> Improve sum() function over windowing to support additional range formats
> -------------------------------------------------------------------------
>
>                 Key: HIVE-10650
>                 URL: https://issues.apache.org/jira/browse/HIVE-10650
>             Project: Hive
>          Issue Type: Sub-task
>          Components: PTF-Windowing
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-10650.patch
>
>
> Support the following windowing function {{x preceding and y preceding}} and {{x following and y following}}.
> e.g.
> {noformat} 
> select sum(value) over (partition by key order by value rows between 2 preceding and 1 preceding) from tbl1;
> select sum(value) over (partition by key order by value rows between unbounded preceding and 1 preceding) from tbl1;
> {noformat}



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