On Thu, Oct 9, 2025 at 5:07 PM Richard Guo <[email protected]> wrote: > I noticed an unnecessary header include in initsplan.c. Will fix that > as well.
I noticed a couple of issues that can lead to unexpected results. I've attached two patches to fix them. 1. Eager aggregation was incorrectly checking the data type's default collation rather than the expression's actual collation. This allowed columns with non-deterministic collations to be pushed down, resulting in incorrect grouping. Fixed by 0001. 2. Pushing aggregates containing volatile functions below a join alters their execution count. Fixed by 0002. (As briefly discussed on Discord, this non-deterministic collation issue also exists in our long-existing logic for pushing HAVING down to WHERE. But let's fix it for the eager aggregation first.) - Richard
v1-0001-Fix-collation-handling-for-grouping-keys-in-eager.patch
Description: Binary data
v1-0002-Fix-volatile-function-evaluation-in-eager-aggrega.patch
Description: Binary data
