Hi, On Wed, Nov 6, 2024 at 12:19 PM jian he <jian.universal...@gmail.com> wrote: > looks good to me. > I didn't find any issue.
Thanks for the review. > group_by_has_partkey can even cope with: > EXPLAIN (COSTS OFF, settings) > SELECT c collate "C" collate case_insensitive collate "C", count(c) > FROM pagg_tab3 GROUP BY c collate "C" collate case_insensitive collate > "C" ORDER BY 1; > > so i guess in group_by_has_partkey > if (IsA(groupexpr, RelabelType)) > groupexpr = ((RelabelType *) groupexpr)->arg; > should be enough. > > not need while loop. > > while (IsA(groupexpr, RelabelType)) > groupexpr = (Expr *) (castNode(RelabelType, groupexpr))->arg; Added a comment about that. Pushed both patches after making changes to 0001 to allow "partial" partitionwise aggregation after all. The differences in output with partial partitionwise aggregation and no partitionwise aggregation that I mentioned before don't seem to have anything to do with partitionwise aggregation, but apparently with whether aggregation was hashed or not. I confirmed that by turning enable_hashagg on and off to see the difference. Changing enable_partitionwise_aggregate for either of the values of enable_hashagg didn't change the plan. Thank you all for working on this. -- Thanks, Amit Langote