Repository navigation
fix(python-sdk): preserve mutation state when cloning SQL builders - #30877
mergify[bot] merged 2 commits into
Conversation
Copy the existing operation, INSERT row containers and UPDATE SET state. Add real SQL result and copy-isolation regressions. Related to matrixorigin#30876. 由 LW 授权的 ChatGPT Personal 智能体提交。
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? |
|
由 LW 授权的 ChatGPT Personal 智能体提交。 固定交付记录:head28ed91a784de1994f797de07c79ac4f99a287474,base main cf48add,产品tree8ba3e0937972b582946d1b4c4ef5f6639c9879a2与本地已测/独立Approve commit b9e9145c9ab24629aa61279cf1793b09e93e3ced相同。2文件+78/-0。初始12case实际RED10failed/2passed;补bulk-input容器别名后最终13/13,owningfile51/51,完整offline1311+86subtests。fatal Flake8、sdist/wheel及Twine通过,已核对打包wheel含最终clone字段修复。独立review完整覆盖全部最终delta,并独立执行原始/修复对照、13focused及51owning测试,明确Approve,无阻塞。 上游正式CI https://github.com/matrixorigin/matrixone/actions/runs/39809700496 :六个SDK矩阵job和CI Required均SUCCESS。原始日志已读取:SA1.4为1311、SA2.0为1307、SA2.1为1315,均+86subtests,所有包校验PASSED。Iceberg adapter module tidy SUCCESS,kernel/BVT/upgrade/full-online按配置SKIPPED,不声称覆盖。此为当前固定源码的执行证据;ready事件可能重新触发同源码CI,不将排队运行说成已完成。 已转ready、assign XuPeng-SH、request reviewer XuPeng-SH,读回draft=false、PR assignee包含XuPeng-SH、requested reviewers包含XuPeng-SH(另有自动aptend),正文内容与实际发送一致并保留模板/LF。Issue30876 assignee此前已读回。本人fork关系/权限和无dev的main fallback已实时核实;maintainer_can_modify实际True。所有fork feature分支/commit/Issue/PR创建、ready、指派、审阅请求及只读核验均由本署名主体执行。未推上游/default分支,不合并、不部署、不自动关闭Issue。 |
|
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-xupeng · review
Commit: 28ed91a784de1994f797de07c79ac4f99a287474
Assessment: approve
Reviewed the complete two-file delta, callers, ownership, error paths and test quality. Cloning preserves mutation state and independent builder containers while retaining shallow parameter semantics. No actionable defects found.
Model: gpt-6-astra / xhigh
Session: 01a14d34-4e51-79a3-a62d-6c9c16279dc8 · slot 0 · generation 0
Validation:
-
Owning test file: 51 passed, including all 13 new regressions, on Python 3.13.5 and SQLAlchemy 2.0.55.
-
Additional probes passed for incomplete-write validation, independent completion/reset/predicates, parameter identity and SELECT clauses. Base controls reproduced mutation clones becoming SELECT.
-
An initial existing-test failure caused by missing dialect registration was resolved by installing the pinned SDK package; the complete owning file then passed.
-
Preflight and git diff --check passed. Source remained unchanged. Commands, source fingerprints, exits and retained logs reconciled in /home/xupeng/.local/state/mo-bot/jobs/01f0cdec1579863129c81628/attempt-1/evidence-audit.json.
Limitations:
-
Full offline suite and live MatrixOne tests were not rerun locally. SQLite validates emitted ordinary SQL, not MatrixOne server behavior.
-
Captured CI statuses show six successful SDK matrix cells, but raw CI/author logs were unavailable for independent reconciliation.
-
Linked issue #30876 text was absent from supplied evidence; its behavioral contract was assessed from the PR description.
Merge Queue Status
This pull request spent 27 minutes 34 seconds in the queue, including 1 minute 51 seconds running CI. Required conditions to merge
|
由 LW 授权的 ChatGPT Personal 智能体提交。
What type of PR is this?
Which issue(s) this PR fixes:
Related to #30876. No automatic issue closure is requested.
What this PR does / why we need it:
MatrixOneSQLBuilder.clone()resets the operation to SELECT and omits INSERT/UPDATE payloads. Executing a cloned write therefore reads rows without performing the intended mutation; adding values()/set() to the clone also raises a wrong-operation error.Copy the existing operation type, INSERT columns/row containers and UPDATE SET state. Preserve current parameter-value semantics: builder containers are independent, arbitrary user values are not deep-copied. SELECT and DELETE retain the existing query-clause copying. No new state owner, dependency, generated file, server behavior or API signature.
Two files, +78/-0. The existing test file now exercises actual public-builder SQL using a tiny disposable native SQLite DBAPI table: INSERT, bulk INSERT (including NULL), UPDATE, DELETE and SELECT in both binding/substitution modes; independent additions/reset; and bulk input aliases.
Verification
cf48adddcda41c2ae754904af76b034a83b83163; remote head28ed91a784de1994f797de07c79ac4f99a287474; full tree8ba3e0937972b582946d1b4c4ef5f6639c9879a2equals tested local commitb9e9145c9ab24629aa61279cf1793b09e93e3ced.PYTHONPATH=. python -m pytest tests/offline -o addopts='' -q --tb=short: 1311 passed +86 subtests, 3 existing warnings, zero failed/skipped.E9,F63,F7,F82,git diff --check, wheel/sdist build and Twine checks passed. Required packaging tools were installed in an isolated workspace environment; no repository dependencies changed.fix/python-builder-clone-mutations-20261022was created; no upstream/default ref is written.由 LW 授权的 ChatGPT Personal 智能体提交。