Repository navigation
fix: honor default frames for value window functions - #28152
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approved on exact head 5d66b83f01feb8ced4aa629490f18766f3d6ee3c.
The fix correctly narrows the old full-partition override to the frame-independent value functions LAG/LEAD. FIRST_VALUE, LAST_VALUE, and NTH_VALUE now retain the normal ordered default frame (RANGE UNBOUNDED PRECEDING through CURRENT ROW), while an omitted frame without ORDER BY still covers the full partition and explicit frames remain unchanged.
Counterexamples checked:
- peer rows and NTH_VALUE before the requested row enters the frame;
- no ORDER BY;
- explicit full-partition ROWS frame;
- LAG and LAST_VALUE consuming the same named window without cross-mutation;
- existing NULL/frame executor coverage.
Performance: this adds no sort, materialization, or retained memory. Frame-sensitive functions use the already-built peer boundaries; the per-row boundary lookup remains within the existing window-sort complexity. Exact-head Linux UT/SCA/BVT are green, and the new BVT was selected by the successful proxy job. No correctness, unhappy-path, hang, or performance blocker found.
Merge Queue Status
This pull request spent 9 minutes 16 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. Tick the box to put this pull request back in the merge queue (same as
|
) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27341 ## What this PR does / why we need it: fix: honor default frames for value window functions Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27341 ## What this PR does / why we need it: fix: honor default frames for value window functions Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27341 ## What this PR does / why we need it: fix: honor default frames for value window functions Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #27341
What this PR does / why we need it:
fix: honor default frames for value window functions