Re: more support for various frame types of window functions - Mailing list pgsql-hackers

From Hitoshi Harada
Subject Re: more support for various frame types of window functions
Date
Msg-id e08cc0400911090725u42b3b632o8126aa1ec00c9d60@mail.gmail.com
Whole thread Raw
In response to Re: more support for various frame types of window functions  (David Fetter <david@fetter.org>)
List pgsql-hackers
2009/11/10 David Fetter <david@fetter.org>:
> On Mon, Nov 09, 2009 at 11:20:39PM +0900, Hitoshi Harada wrote:
>> 2009/11/9 David Fetter <david@fetter.org>:
>> > On Mon, Nov 09, 2009 at 06:39:54PM +0900, Hitoshi Harada wrote:
>> >> I'm not sure if it can be finished until the start of the next CF,
>> >> but I've been working on $subject. This work intends to extend
>> >> current limited frame types of window functions such like below;
>> >
>> > This is very, very exciting.  Is there a public repository people can
>> > check out?
>> Not so far as always. The step is quite small so I don't believe we
>> need developing repository but I'll create it when needed.
>
> Thanks :)
>
>> >  In particular, I'm curious about how to handle ROWS vs.
>> > RANGE, e.g.:
>> >
>> >    avg(t) OVER (...
>> >        ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING) AS smooth_five_points
>> >
>> > vs.
>> >
>> >    avg(t) OVER (...
>> >        RANGE BETWEEN
>> >        INTERVAL '2 day' PRECEDING AND
>> >        INTERVAL '2 day' FOLLOWING) AS five_day_average
>>
>> I've not finished reading spec completely, but in the first frame
>> starts at exactly 2 rows before current row and ends at exactly 2
>> rows after current row. The latter is a bit more complicated but it
>> means the frame starts at the beginning of peers whose value in
>> ORDER BY clause is current row value - 2 days and so on.
>
> That's pretty much it.  The spec may have some other things to say
> about corner cases, NULLs, etc.
OK, I'll check it.

>> > First, it's wonderful to hear you're working on this. :)
>> Thanks. I hope it will be done until 8.5 release.
>
> Will you be at the JPUG 10th anniversary?
Sure, I'll be there for both two days and give lightning talk on
Saturday evening (but in Japanese, sorry!)

>
> Might code be there in time for that?
I hope so...



--
Hitoshi Harada


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Next
From: Andres Freund
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a