On 25 February 2015 at 08:15, Peter Eisentraut <pete...@gmx.net> wrote:
> On 2/20/15 3:32 PM, Tomas Vondra wrote: > > > Also, there are aggregate functions like array_agg() or string_agg() > > that make this impossible, just like for many custom aggregates (like > > hyperloglog for example). Again, I might not understand the idea > > correctly ... > > How would a combining function work for something like array_agg()? I > don't think it would, at least if you want to preserve the ordering > option for the user. > > They just wouldn't work in that case. We'd simply not have a combine function for that aggregate. The yet to be written code, (say parallel hash aggregate), the planner would have to ensure that each aggregate function being used had a combine function, if any aggregate in the current query level didn't have one then it would not parallelise the query. Regards David Rowley