model-writtenrun 1727 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Richard Guo reported missed distinctness deductions for empty grouping sets in #1, choosing a groupDistinct check followed by expand_grouping_sets() over manual tree inspection and adding regression coverage for join removal.
- Richard added a GROUP BY DISTINCT test and a commit message in #2, retaining the original implementation.
- David Rowley questioned whether the issue required backpatching and requested clearer wording in #3 and #4; Richard explained in #5 that these were false negatives causing missed optimizations, not incorrect query results.
- David refined the wording to acknowledge that distinctness detection need not recognize every possible case in #6, and Richard incorporated that clarification without code changes in #7.
- Richard committed #7 as f00484c170 with only rebase and whitespace differences, credited David's review, and confirmed the push in #8; the change was complete and deliberately not backpatched because it could change plans.