Repository navigation
fix(python-sdk): preserve query execution semantics - #30961
mergify[bot] merged 2 commits into
Conversation
|
Validation update for exact head
The live server reported The MatrixOne-specific compatibility gap that kept this PR in Draft is now closed; full SQL BVT remains outside this PR's targeted Python SDK scope. |
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: 56b58c2f169bf3a08f72a81b8bbc56517e678e68
Assessment: approve
Reviewed the complete three-file delta and affected callers. The shared ORM helpers correctly preserve query cardinality and reusable state without duplicating execution paths or adding database round trips. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
All 19 PR regressions and 11 additional checks passed on Python 3.13.5 / SQLAlchemy 2.0.55, covering CTE/HAVING parameters, joins, transaction routing, cursor results, empty inputs and cancellation.
-
Test receipt checks/1792801906852526647-3.json matches the frozen head, exit 0, query-tests.log and query-tests.xml.
-
Final evidence audit and git diff --check passed; receipt checks/1792802014340501210-4.json confirms the frozen head and clean source.
-
Reviewed the supplied successful CI results for six Python/SQLAlchemy combinations and the exact-head author report of nine live MatrixOne assertions per client. Audit details are retained in /home/xupeng/.local/state/mo-bot/jobs/f71ff722739d60532a8a104d/attempt-1/review-evidence.json.
Limitations:
-
Local behavioral checks use SQLite. The author's live MatrixOne validation was not independently rerun, and raw live-run receipts were not supplied.
-
No performance benchmark was run. The changes add a shallow query copy and SQL wrapping; complex count-query costs remain workload-dependent.
Merge Queue Status
This pull request spent 3 minutes 3 seconds in the queue, including 2 minutes 1 second running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
Closes #30960
What this PR does / why we need it:
Python SDK query terminal operations currently return wrong counts and corrupt reusable query state. For four rows with IDs 10/20/30/40, selecting ID then calling count() returns 10, while limit(2).offset(1).count() returns 0. Calling first() on a three-row page permanently shrinks subsequent all() calls to one row; a failed async projection build also leaves a database prefix behind.
The two implementations share the existing ORM owner helpers. Legacy Query and SQL-builder clone behavior are outside this change. Scope: 3 files, +155/-20, including one behavioral regression file; no dependency, server, workflow or gate changes.
Validation (Linux, Python 3.12.14):
e19f698de0fc52a60f60f2ff689d6d16a5100334plus the new regressions: 17 failed, 2 zero-limit controls passed. The old-source export is independent of the working tree.PYTHONPATH=. python -m pytest tests/offline -o addopts='' -q --tb=short --junitxml=...passes 1329 tests and 95 subtests.python -m flake8 matrixone --select=E9,F63,F7,F82 --show-source --statistics), regression-file lint, compileall and git diff --check pass.56b58c2f169bf3a08f72a81b8bbc56517e678e68passed live publicClientandAsyncClientchecks against MatrixOne v4.2.6-hotfix-20261021 (reported backend8.0.30-MatrixOne-v4.2.6-hotfix-20261021): 9 assertions per client covering projection, grouped, DISTINCT, aggregate, paged and parameterized counts plusfirst()/all()query-state preservation.fce5904efdbac1b126b052dbaca1a5fb23977ac216d48203d94f3ff4012652d9.Remaining limits: Full SQL BVT and server-specific derived-query edge cases outside the reported public-client scenarios were not run.