Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-12 Thread Masahiko Sawada
On Fri, Jul 13, 2018 at 12:17 AM, Tom Lane wrote: > Masahiko Sawada writes: >> I think we also can update the doc about that GROUPS offset mode >> requires ORDER BY clause. Thoughts? Attached patch updates it. > > Ooops, I forgot to check the docs. This isn't quite the right fix > though ---

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-12 Thread Tom Lane
Masahiko Sawada writes: > I think we also can update the doc about that GROUPS offset mode > requires ORDER BY clause. Thoughts? Attached patch updates it. Ooops, I forgot to check the docs. This isn't quite the right fix though --- the problem is that there's a sentence at the end of that para

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-11 Thread Masahiko Sawada
On Wed, Jul 11, 2018 at 4:21 AM, Tom Lane wrote: > Masahiko Sawada writes: >> BTW, I found an another but related issue. We can got an assertion >> failure also by the following query. > >> =# select sum(c) over (partition by c order by c groups between 1 >> preceding and current row) from test;

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-10 Thread Tom Lane
Masahiko Sawada writes: > BTW, I found an another but related issue. We can got an assertion > failure also by the following query. > =# select sum(c) over (partition by c order by c groups between 1 > preceding and current row) from test; Oh, good point, that's certainly legal per spec, so

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-09 Thread Masahiko Sawada
On Tue, Jul 10, 2018 at 7:24 AM, Tom Lane wrote: > Masahiko Sawada writes: >> I got an assertion failure when I use GROUPS mode and specifies offset >> without ORDER BY clause. The reproduction steps and the backtrace I >> got are following. > >> =# create table test as select 1 as c; >> =#

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-09 Thread Tom Lane
Masahiko Sawada writes: > I got an assertion failure when I use GROUPS mode and specifies offset > without ORDER BY clause. The reproduction steps and the backtrace I > got are following. > =# create table test as select 1 as c; > =# select sum(c) over (partition by c groups between 1 preceding

Re: Failure assertion in GROUPS mode of window function in current HEAD

2018-07-08 Thread Masahiko Sawada
On Wed, Jul 4, 2018 at 11:24 PM, Masahiko Sawada wrote: > Hi, > > I got an assertion failure when I use GROUPS mode and specifies offset > without ORDER BY clause. The reproduction steps and the backtrace I > got are following. > > =# create table test as select 1 as c; > =# select sum(c) over