Repository navigation
fix(plan): push outer pagination into derived-table sorts - #32230
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: dcf4195b63866ffdfda33e11dedf38687c1f68fa
Assessment: approve
The rewrite reuses existing pagination and Top-N machinery while preserving semantic boundaries and recursive zero-limit handling. No actionable defects found.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Reviewed the complete delta, affected consumers, linked issue and all discussion; saved review records.
-
Supplied frozen-head CI reports successful UT, static analysis, coverage and both multi-CN BVT groups.
-
Local audit passed source identity, diff/gofmt and independent expected-row checks for 31 queries across 56 SQL statements. Receipt: checks/1793882809279185775-2.json; log: review-audit-v3.log.
Limitations:
-
No local Go or MatrixOne execution; raw CI/author logs were unavailable. The independent SQL oracle validates expected rows, not MatrixOne execution.
-
No million-row latency benchmark; performance conclusions are limited to plan selection and existing Top-N behavior.
❌ Left the queue · checks failed1 h 14 min in the queue, with no time running CI. So far
The failure is in this pull request. It failed tested alone on top of Reason The merge conditions cannot be satisfied due to failing checks
To get back in the queue
Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
What type of PR is this?
Which issue(s) this PR fixes:
Closes #32014
What this PR does / why we need it:
An outer LIMIT on an ordered derived table stays on its PROJECT, leaving the inner SORT unbounded and missing the existing Top-N path.
Validation (Go 1.27.1):
pkg/sql/planandpkg/sql/compilesuites pass throughmo-cgo-test; both modified functions have 100% statement coverage.-race.offset_without_limit.sql: 56/56 checks in two standalone runs and a two-CN run, including prepared LIMIT values 2 → 0 → 1 → 0.