Repository navigation
fix(planner): honor query-level IVF nprobe options - #30002
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 belongs to an older commit; it is not a review of the current head. |
afc1750 to
6788289
Compare
aunjgr
left a comment
There was a problem hiding this comment.
Reviewed 6788289 against merge-base f802ab6. No blocking finding.
The parser rejects malformed/nonliteral option payloads, the planner validates nprobe against the existing session domain, and explicit overrides bypass session lookup without mutating it. The additive field survives serialization, deep copy and mode-less UNION planning. Both IVF consumers use the selected base; AUTO amplification/final POST propagation, FORCE and existing defaults remain owned by their existing paths.
Reviewed the production delta, generated field/action changes and test closures. Reused reported owning tests, static checks, CPU build and twice-repeated normal SQL comparison with current-head CI. The extended IVF tests retain previous default/INCLUDE/adaptive controls while adding query-base and emitted IVF-PQ configuration assertions. No local native service or GPU execution was rerun by me; GPU runtime validation is not claimed.
6788289 to
a35afe4
Compare
bc30a79 to
2e6ad3f
Compare
2e6ad3f to
46b39d2
Compare
|
mo-bot review · Commit: Assessment: approve Reviewed the complete 17-file delta and affected consumers. Query-level nprobe reaches both IVF planners, preserves existing search policies and defaults, and survives copying and serialization. No actionable defects remain. Model: Session: Validation:
Limitations:
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 64b2ab9f599510fa538e546e07cef77667311980
Assessment: approve
Reviewed the complete 17-file delta and affected consumers. Query-level nprobe reaches both IVF planners, preserves existing search policies and defaults, and survives copying and serialization. No actionable defects remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
Validation:
-
24 focused tests passed across planner, MySQL parser and plan protobuf packages, covering boundaries, rejection, defaults, UNION propagation, AUTO, FORCE and emitted IVF-PQ configuration.
-
Audited generated parser changes and the complete protobuf descriptor; only the intended semantics and additive nprobe field changed.
-
Verified native-input provenance, executor preflight, exact-head command receipts and retained logs. Source remained clean.
-
Frozen evidence reports successful exact-head build, Linux UT, static analysis and both BVT groups.
-
Detailed scope and receipt reconciliation are retained in attempt-1/review-map.json and attempt-1/validation-evidence.json.
Limitations:
-
GPU execution was not run; CPU tests verify emitted configuration, and the unchanged GPU consumer was traced.
-
Public SQL case/results were reviewed; CI conclusions were reused. Underlying CI logs and the author's separate BVT logs were unavailable for independent audit.
-
The linked issue body was absent from the frozen packet; review used the behavioral contract documented in the PR.
Merge Queue Status
This pull request spent 1 hour 20 minutes 2 seconds in the queue, including 1 hour 19 minutes 40 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
LIMIT ... BY RANK WITH OPTION 'nprobe=N'now overrides the sessionprobe_limitbase for both IVFFLAT and IVF-PQ, including when nomodeis specified. Previously the planner discarded this option and always used the session value.The option is validated as an integer in 1–80000, carried through plan serialization, deep copies and UNION planning, and resolved by both IVF planners. Existing AUTO amplification and adaptive widening, FORCE behavior, and exact PRE search are preserved. Queries without an override retain existing defaults. Unsupported
fudge_factor, unknown keys, malformed key/value strings and nonliteral options now return explicit errors.Validation:
pkg/sql/plan,pkg/sql/parsers/dialect/mysql, andpkg/pb/plantests passed, including IVF-PQ emitted configuration and AUTO query-base propagation.go vet, incremental golangci-lint, formatting and diff checks passed; CPU service build passed.No per-row processing cost is added. The plan field is additive; query option support requires updated planners. GPU IVF-PQ execution was not run on this CPU host; its planning and emitted search configuration are covered by CPU tests. PR CI remains pending. The reported issue should be verified by its reporter after merge.