Re: Wrong aggregate result when sorting by a NULL value
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>, Ondřej Bouda <obouda@email.cz>, pgsql-bugs@postgresql.org
Date: 2018-11-03T23:08:37Z
Lists: pgsql-bugs
Hi, On 2018-11-03 15:27:09 -0700, Andres Freund wrote: > On 2018-11-03 18:18:40 -0400, Tom Lane wrote: > > Andres Freund <andres@anarazel.de> writes: > > > And pushed. Thanks Ondřej for the report, thanks Tom & Andrew for > > > identifying the issue. > > > > Hm, buildfarm seems less than pleased. Did you miss making a > > corresponding change in the JIT code? > > Hm, I'm somewhat confused, let me look into that. The JIT code shouldn't > really need to be changed here - it's the *generation* of expression > steps that's going wrong - which then later get turned into JITed code, > but that part worked previously for other expressions. Turns out it's not a great idea to generate EEOP_AGG_STRICT_INPUT_CHECK expressions with nargs = 0. Head -> Desk. Pushed a fix (+ new assertion). Thanks! Andres Freund
Commits
-
Fix unused-variable warning.
- 6f4e01c7d289 11.1 landed
- 3e0b05a75673 12.0 landed
-
Prevent generating EEOP_AGG_STRICT_INPUT_CHECK operations when nargs == 0.
- 6eb31cedb316 11.1 landed
- 793beab37e8f 12.0 landed
-
Fix STRICT check for strict aggregates with NULL ORDER BY columns.
- fd59b29c8739 11.1 landed
- 4c640f4f38d5 12.0 landed
-
Expression evaluation based aggregate transition invocation.
- 69c3936a1499 11.0 cited