regress: query discrepancy between explain vs execution
Hi,
In the partition_aggregate tests, there's a case where the explained
query doesn't match the query that's executed just below. This has
existed since the file was first committed (e2f1eb0ee3), and doesn't
materially affect the plan, but if any issues were introduced it might
not show up in this part of the test, so we should probably fix it.
Attached is a simple fix. I noticed the issue whilst debugging my
low-rowcount parallel scan costing efforts [0]/messages/by-id/CAEze2Wi+Jp26mhBJvrMshKGYNTtPcxzd1BWoEW_7+eH6saj3gQ@mail.gmail.com.
Kind regards,
Matthias van de Meent
Databricks (https://www.databricks.com)
[0]: /messages/by-id/CAEze2Wi+Jp26mhBJvrMshKGYNTtPcxzd1BWoEW_7+eH6saj3gQ@mail.gmail.com
The following review has been posted through the commitfest application:
make installcheck-world: tested, failed
Implements feature: tested, failed
Spec compliant: not tested
Documentation: not tested
Hello,
This patch looks good to me.
I don't think that there is a need to test spec. compliance or to test documentation.
Regards,
PF.
On Sat, 3 Oct 2026 at 04:42, Matthias van de Meent <boekewurm@gmail.com> wrote:
In the partition_aggregate tests, there's a case where the explained
query doesn't match the query that's executed just below. This has
existed since the file was first committed (e2f1eb0ee3), and doesn't
materially affect the plan, but if any issues were introduced it might
not show up in this part of the test, so we should probably fix it.
I looked at this and noticed a couple more mistakes. Can you share why
you picked the HAVING query over the version without?
v2 attached with the other things I noticed. array_agg has supported
partial aggregation since v16 (16fd03e95).
David
On Mon, 19 Oct 2026, 02:46 David Rowley, <dgrowleyml@gmail.com> wrote:
On Sat, 3 Oct 2026 at 04:42, Matthias van de Meent <boekewurm@gmail.com> wrote:
In the partition_aggregate tests, there's a case where the explained
query doesn't match the query that's executed just below. This has
existed since the file was first committed (e2f1eb0ee3), and doesn't
materially affect the plan, but if any issues were introduced it might
not show up in this part of the test, so we should probably fix it.I looked at this and noticed a couple more mistakes. Can you share why
you picked the HAVING query over the version without?
Because that was more consistent with the rest of the queries in the
file. Every other explained-and-then-executed query on pagg_tab_ml
has a HAVING clause, except these.
v2 attached with the other things I noticed. array_agg has supported
partial aggregation since v16 (16fd03e95).
Thanks, LGTM.
Kind regards,
Matthias van de Meent
Databricks
On Mon, 19 Oct 2026 at 23:03, Matthias van de Meent <boekewurm@gmail.com> wrote:
On Mon, 19 Oct 2026, 02:46 David Rowley, <dgrowleyml@gmail.com> wrote:
I looked at this and noticed a couple more mistakes. Can you share why
you picked the HAVING query over the version without?Because that was more consistent with the rest of the queries in the
file. Every other explained-and-then-executed query on pagg_tab_ml
has a HAVING clause, except these.
Thanks for explaining.
v2 attached with the other things I noticed. array_agg has supported
partial aggregation since v16 (16fd03e95).Thanks, LGTM.
Pushed. I did a back patch of this too, as this test file has really
not changed much since REL_14_STABLE, and I felt doing that might
reduce some future backpatching pain.
David