model-writtenrun 4786 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley proposed extending the existing window-function run-condition optimization to ntile(), percent_rank() and cume_dist(), attaching support-function changes and ntile() regression coverage in #1.
- Melanie Plageman reviewed the patch, asked why these functions had originally been omitted, and suggested a macro for the three repeated code blocks in #2.
- David explained that the functions had simply been overlooked and favored explicit code so each function's monotonic properties remained immediately visible in #3; Melanie accepted that reasoning after considering the surrounding code in #4.
- David reported in #5 that a million-row ntile() example improved from 254.118 ms to 140.023 ms, while explaining that these functions still require loading the entire partition to count its rows, limiting gains compared with row_number().
- David committed #1 unchanged as 456fa635a9, crediting Melanie's review, and confirmed the push in the final message #5, leaving no outstanding patch work.