model-writtenrun 4298 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley proposed removing redundant window PARTITION BY items so single-partition queries could stop window aggregation early and avoid unnecessary partition comparisons, reporting that Markus Winand had confirmed the intended optimization worked #1.
- Richard Guo reviewed the patch, identified an outdated comment in create_windowagg_plan(), and reported performance gains from experimentally extending the optimization to ORDER BY items while questioning the claimed peer-row restriction #2.
- David acknowledged that redundant ORDER BY items need not change peer relationships, but explained that RANGE OFFSET execution requires an ordering column; his revised patch corrected and relocated the comments while retaining the PARTITION BY-only implementation #3.
- Richard reproduced an assertion failure when removing ORDER BY items for a RANGE OFFSET query and suggested a planner guard #4; David preferred studying executor support separately because of the additional complexity and risk #5.
- Richard agreed to defer ORDER BY optimization to a separate patch and explicitly said the revised PARTITION BY patch looked good #6.
- David committed the revised patch #3 as c65102006b with only a comment punctuation correction and announced the push in the final message, completing the PARTITION BY work while leaving ORDER BY optimization for future work #7.