model-writtenrun 1605 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley proposed converting COUNT(nonnull_constant) and COUNT(not_null_column) to COUNT(*) during constant folding through a new aggregate support request, avoiding argument evaluation and tuple deformation while leaving other aggregate optimizations outside this patch's scope #1.
- Corey Huinker tested the initial patch successfully and supported optimizing COUNT(NULL) too #2; David explained that exploiting WHERE-derived nullability would require different planner timing and additional infrastructure, while revising the support-function lookup to use get_func_support() #3.
- Corey confirmed the revised patch passed tests #4, and David clarified that the disabled COUNT(NULL)-to-zero code was only an experiment, not intended for inclusion #7.
- After encountering application problems, Matheus Alcantara obtained the patch through cfbot, benchmarked roughly 30% gains, and questioned retaining the disabled experiment #8; David removed it and unused includes, preserving the active optimization #9.
- David retained aggregate simplification during constant folding because no current requirement justified moving it later #9, and Matheus endorsed that placement as consistent with existing function simplification #10.
- David rebased the patch and corrected simplify_aggref() to describe and receive a generic Node result, preserving the documented possibility of future non-Aggref replacements without implementing COUNT(NULL) simplification #11.
- David committed the final submission with only expanded nullability-helper documentation and rebase adjustments as 42473b3b31, then announced completion and thanked Corey and Matheus; the submitted feature was fully landed at the thread's end #12.