Re: Refactor to split nodeAgg.c? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Refactor to split nodeAgg.c?
Date
Msg-id 20150630094859.GS30708@awork2.anarazel.de
Whole thread Raw
In response to Refactor to split nodeAgg.c?  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Hi,

On 2015-06-29 19:33:58 -0700, Jeff Davis wrote:
> I was going to rebase my HashAgg patch, and got some conflicts related
> to the grouping sets patch. I could probably sort them out, but I think
> that may be the tipping point where we want to break up nodeAgg.c into
> nodeSortedAgg.c and nodeHashAgg.c, and probably a common file as well.

I'm not sure that's going to be helpful and clean without a significant
amount of duplication. Grouping sets right now use sorting, but Andrew
Gierth already is working on a patch that employs hashing for individual
group of groups that support it and where the aggregated state is deemed
small enough.  That implies a fair amount of coupling between the sorted
and hashed aggregation modes.

I'm not sure that conflicts due to GS can be taken as an argument to
split the file - I doubt there'd be significantly fewer with a splitup
since common datastructures have been changed.

That said, I think e.g. splitting out the lowest level of interaction
with aggregation functions and transition layers could be split off
without too much pain.



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: pg_trgm version 1.2
Next
From: David Rowley
Date:
Subject: Re: Refactor to split nodeAgg.c?