Repository navigation
fix(python): preserve JSON string concatenation semantics - #32038
mergify[bot] merged 2 commits into
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: 0ca427bbd77e48c7b4d99f959602ae351b5573f5
Assessment: approve
The String return types correctly restore concatenation semantics for both functions and JSON .astext. Reviewed the complete delta, affected consumers, regression oracles and discussion; no actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2
Validation:
-
Reused supplied frozen-head CI evidence: eight successful Python offline jobs across SQLAlchemy 1.4, 2.0 and 2.1, plus two successful core-import jobs. Verified that CI selects the new regression cases.
-
Source identity, clean worktree, Python syntax, diff whitespace and discussion coverage passed: checks/1793640961006339979-2.json and review-audit-v2.log.
-
Saved review-plan.md, discussion-assessment.json and validation-summary.json; reconciled check receipts with retained logs.
Limitations:
-
Local Python tests were not run because dependencies are absent; author-reported test counts were not independently reproduced.
-
Online CI was skipped. SQLite callbacks validate client operator semantics, not live MatrixOne results; server behavior is unchanged.
✅ Merged into
|
…stream claimed 97 as narrow_scan in matrixorigin#32034); take upstream narrow-scan prefetch, virtual-timestamp reads, temporal integer casts, vector shuffle ownership, JSON concat and logtail append-range changes GitHub reported the PR CONFLICTING (DIRTY): upstream matrixorigin#32034 added `plan.Node.narrow_scan = 97` while this branch's unmerged additive `ScanReadRole scan_read_role` sat on field 97. Semantic resolution, both sides kept: - upstream keeps `narrow_scan = 97` (shipped on main; `plan.pb.go` regenerated from the merged proto with the repository protoc/gogofast pipeline plus both postprocessors; toolchain verified byte-identical against upstream's committed bindings before use); - this branch's additive `scan_read_role` moves 97 -> 98; nothing ever persisted 97 as scan_read_role (unmerged field), provenance comment updated in proto/plan.proto; - `merged_descriptor_test.go` (upstream's merge-collision contract guard) extended to pin Node.narrow_scan=97 / Node.scan_read_role=98 so a future regeneration cannot silently renumber or drop either; - all other overlapping files auto-merged with both sides' hunks intact (upstream: table_scan/narrow-scan scope+operator plumbing, plan binder temporal/int-arg changes, disttae datasource, query_builder/types/ deepcopy/base_binder/apply_indices). Upstream batch: matrixorigin#31268 (virtual timestamp reads), matrixorigin#32001 (temporal integer casts), matrixorigin#32020 (vector shuffle ownership), matrixorigin#32031 (logtail append ranges), matrixorigin#32038 (python JSON-string concatenation; upstream's own change, no PR-side code), matrixorigin#32034 (narrow-scan prefetch).
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #32037
What this PR does / why we need it:
Adding two JSON string expressions generated numeric
+instead ofCONCAT:json_extract_string(...) + json_extract_string(...), including JSON member.astext, andjson_unquote(...) + json_unquote(...). Both functions had SQLAlchemy NullType, so string operator selection was lost unless another operand supplied a string type.Declare String return types for json_extract_string and json_unquote. This makes two extracted strings such as '12' and '34' concatenate to '1234' rather than selecting numeric addition.
Add 12 regression cases covering both functions and .astext with ordinary text, numeric text, Unicode and SQL NULL. Each case checks MatrixOne CONCAT compilation and executes the SQLAlchemy expression in SQLite with callbacks supplying string/NULL function results. This validates client operator semantics, not a live MatrixOne server.
Validation on base b86ddaf:
Production changes are limited to the import and two return-type declarations.