On Sat, Mar 3, 2018 at 12:12 AM, Robert Haas <robertmh...@gmail.com> wrote:
> On Thu, Mar 1, 2018 at 4:52 PM, Robert Haas <robertmh...@gmail.com> wrote: > > This is not a full review, but I'm out of time for right now. > > Another thing I see here now is that create_grouping_paths() and > create_child_grouping_paths() are extremely similar. Isn't there some > way we can refactor things so that we can reuse the code instead of > duplicating it? > Yes. I too observed the same after our re-design. To avoid code duplication, I am now calling create_grouping_paths() for child relation too. However, to perform Gather or Gather Merge once we have all partial paths ready, and to avoid too many existing code rearrangement, I am calling try_partitionwise_grouping() before we do any aggregation/grouping on whole relation. By doing this, we will be having all partial paths in partially_grouped_rel and then existing code will do required finalization along with any Gather or Gather Merge, if required. Please have a look over attached patch-set and let me know if it needs further changes. Thanks > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Jeevan Chalke Technical Architect, Product Development EnterpriseDB Corporation The Enterprise PostgreSQL Company
partition-wise-agg-v15.tar.gz
Description: application/gzip