Re: wrong query result with jit_above_cost= 0

2018-07-22 Thread Andres Freund
Hi, On 2018-07-22 17:09:37 -0700, Andres Freund wrote: > > Also, I found one suspicious thing, in AGG_PLAIN_TRANS section we don't > > switch the memory context back in the branch with ExecAggTransReparent. I > > never found any consequences of that, but just in case I believe it makes > > sense

Re: wrong query result with jit_above_cost= 0

2018-07-22 Thread Andres Freund
Hi, On 2018-07-07 21:41:05 +0200, Dmitry Dolgov wrote: > Ok, looks like I found the issue. v_aggcontext & v_curaggcontext have nothing > to do here (this change was just masking a problem by changing a memory > context > so that the wrong one will never be used). The problem was that in the > llv

Re: wrong query result with jit_above_cost= 0

2018-07-07 Thread Dmitry Dolgov
> On Wed, 27 Jun 2018 at 17:49, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On 26 June 2018 at 22:56, Andres Freund wrote: > > On 2018-06-26 21:55:07 +0100, Andrew Gierth wrote: > >> > "Dmitry" == Dmitry Dolgov <9erthali...@gmail.com> writes: > >> > >> Dmitry> Yep, my bad, forgot to tu

Re: wrong query result with jit_above_cost= 0

2018-06-27 Thread Dmitry Dolgov
> On 26 June 2018 at 22:56, Andres Freund wrote: > On 2018-06-26 21:55:07 +0100, Andrew Gierth wrote: >> > "Dmitry" == Dmitry Dolgov <9erthali...@gmail.com> writes: >> >> Dmitry> Yep, my bad, forgot to turn it on. Now I see what's the >> Dmitry> problem, one of the null fields is screwed up,

Re: wrong query result with jit_above_cost= 0

2018-06-26 Thread Andres Freund
On 2018-06-26 21:55:07 +0100, Andrew Gierth wrote: > > "Dmitry" == Dmitry Dolgov <9erthali...@gmail.com> writes: > > Dmitry> Yep, my bad, forgot to turn it on. Now I see what's the > Dmitry> problem, one of the null fields is screwed up, will try to > Dmitry> figure out why is that. > > Th

Re: wrong query result with jit_above_cost= 0

2018-06-26 Thread Andrew Gierth
> "Dmitry" == Dmitry Dolgov <9erthali...@gmail.com> writes: Dmitry> Yep, my bad, forgot to turn it on. Now I see what's the Dmitry> problem, one of the null fields is screwed up, will try to Dmitry> figure out why is that. The handling of nulls in grouping set results is a bit icky, see pr

Re: wrong query result with jit_above_cost= 0

2018-06-26 Thread Dmitry Dolgov
> On 26 June 2018 at 22:11, Andres Freund wrote: > On 2018-06-26 22:09:10 +0200, Dmitry Dolgov wrote: >> > On 26 June 2018 at 20:23, Andres Freund wrote: >> > Hi, >> > >> > On 2018-06-26 23:50:32 +0530, Rushabh Lathia wrote: >> >> I found the below query which returns the wrong output >> >> when

Re: wrong query result with jit_above_cost= 0

2018-06-26 Thread Andres Freund
On 2018-06-26 22:09:10 +0200, Dmitry Dolgov wrote: > > On 26 June 2018 at 20:23, Andres Freund wrote: > > Hi, > > > > On 2018-06-26 23:50:32 +0530, Rushabh Lathia wrote: > >> I found the below query which returns the wrong output > >> when jit_above_cost= 0 is set. > >> > >> Steps to reproduce: >

Re: wrong query result with jit_above_cost= 0

2018-06-26 Thread Dmitry Dolgov
> On 26 June 2018 at 20:23, Andres Freund wrote: > Hi, > > On 2018-06-26 23:50:32 +0530, Rushabh Lathia wrote: >> I found the below query which returns the wrong output >> when jit_above_cost= 0 is set. >> >> Steps to reproduce: >> >> CREATE TABLE emp ( >> epno NUMERIC(4), >> ena

Re: wrong query result with jit_above_cost= 0

2018-06-26 Thread Andres Freund
Hi, On 2018-06-26 23:50:32 +0530, Rushabh Lathia wrote: > I found the below query which returns the wrong output > when jit_above_cost= 0 is set. > > Steps to reproduce: > > CREATE TABLE emp ( > epno NUMERIC(4), > ename VARCHAR(10), > job VARCHAR(9), >

wrong query result with jit_above_cost= 0

2018-06-26 Thread Rushabh Lathia
Hi, I found the below query which returns the wrong output when jit_above_cost= 0 is set. Steps to reproduce: CREATE TABLE emp ( epno NUMERIC(4), ename VARCHAR(10), job VARCHAR(9), mgr NUMERIC(4), hiredateDATE, sal