Repository navigation
docs: design JSON SQL and physical ordering boundaries - #28315
Closed
VioletQwQ-0 wants to merge 1 commit into
Closed
VioletQwQ-0 wants to merge 1 commit into
VioletQwQ-0 wants to merge 1 commit into
Conversation
1 task done
Collaborator
Author
|
Consolidated unchanged into #28086 at commit |
XuPeng-SH
added a commit
that referenced
this pull request
Sep 12, 2026
## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: issue #28039 ## What this PR does / why we need it: Correct SQL JSON precedence while keeping persisted writer ordering and both raw TAE merger relations unchanged. JSON value-based zone-map pruning fails open; null-count pruning remains available. Numeric peer equality agrees with canonical hash keys. `MIN/MAX(JSON)` remains unsupported and `MIN/MAX(NULL)` retains its previous type. Raw JSON vector writes now validate every descendant before publishing a row. Checked binary, copied, reader, selected-row, legacy and raw-copy decoders reject corrupt non-NULL payloads before publication. Encoders validate their emitted bytes; failed appends/replacements preserve visible state. Same-type copies/unions and the existing sealed objectio V2 cache retain explicit immutable admitted-source preconditions. Direct SQL comparison therefore uses the trusted comparator without a full descendant walk per comparison or a full-column cache. Public ByteJSON comparison/hash retain deterministic raw fallback for malformed diagnostic values. Version 3 of [the design](https://github.com/VioletQwQ-0/matrixone/blob/396d983ec8e4027b86b4c92f425a862fcb9e2bf7/docs/design/json_sql_physical_order.md) records these admission owners, unchanged physical relations, resource-policy limits and the homogeneous-query rollout requirement. The separate design PR #28315 is closed and its document is consolidated here. **Independent design approval remains pending; local repair/preflight is not that approval.** Validation for `396d983ec8e4027b86b4c92f425a862fcb9e2bf7`: - This update adds test assertions only; production content is unchanged from acb817e. Shared serialized-byte traversal budget and depth limit100 remain in force. An isolated old-validator baseline fails the alias-work/depth tests; current boundary tests pass. - New assertions verify valid reuse after rejected raw writes and checked decode, retained/empty visible state, failed raw-copy constructor returning nil, and terminal mpool cleanup. Existing admission tests and full validator/vector race packages pass; focused stress counts use recorded timing measurements. - Fresh CGo core/consumer/affected-fixture package checks and ISCP pass. Build/vet and diff-check pass. Focused admission measurements observed zero allocations for small/wide inputs; race is not a complexity or resource-release proof. - Real service canonical JSON ordering/window BVT passes 47/47, including new RANK/DENSE_RANK numeric peers. Retained-run physical merger/write/read tests pass; no rolling-upgrade acceptance is claimed. - The preceding head's GitHub Coverage failed in the SNAPSHOT registry guard, with dependent Coverage blocked; existing #28259 records the same signature. Local CI-tagged SNAPSHOT passes, but the complete issues package fails on a distinct CDC writer-wins waiter timeout (historical context #28282). That CDC case passes in isolation. Both results are retained; the entire package is not called PASS. - Whole-diff schema-v7 review/mapping remains PENDING. The unsupported prior overall PASS stays withdrawn. New-head CI, independent version3 design approval, review decisions and QA remain required. - Continuing correction and reproducible evidence summary: #28086 (comment) QA required: yes. This changes visible SQL comparison/order/hash behavior and corruption handling. Automated coverage reaches direct SQL, multi-key/numeric peers, pruning, checked admission and real merger object readback. Independent design approval, required current-head CI, review approval, and versioned QA on homogeneous query-executing CNs remain required. Keep #28039 open until explicit QA acceptance; this PR does not request issue closure. ### Evidence correction — 2026-09-08 Evidence correction (2026-09-08): the whole-diff semantic PASS previously reported here is withdrawn. The manifest generator copied expected results into observed results and set PASS unconditionally; the validator checked declarations and coverage structure, not their truth. Individual executable results are separate evidence and are being checked against their exact content and test assertions. Overall semantic review is PENDING. This correction does not claim that all tests were invalid or that the code repair failed. Current-head CI, reviewer approval and applicable design/QA gates remain separate. --------- Co-authored-by: XuPeng-SH <[email protected]>
VioletQwQ-0
added a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: issue matrixorigin#28039 ## What this PR does / why we need it: Correct SQL JSON precedence while keeping persisted writer ordering and both raw TAE merger relations unchanged. JSON value-based zone-map pruning fails open; null-count pruning remains available. Numeric peer equality agrees with canonical hash keys. `MIN/MAX(JSON)` remains unsupported and `MIN/MAX(NULL)` retains its previous type. Raw JSON vector writes now validate every descendant before publishing a row. Checked binary, copied, reader, selected-row, legacy and raw-copy decoders reject corrupt non-NULL payloads before publication. Encoders validate their emitted bytes; failed appends/replacements preserve visible state. Same-type copies/unions and the existing sealed objectio V2 cache retain explicit immutable admitted-source preconditions. Direct SQL comparison therefore uses the trusted comparator without a full descendant walk per comparison or a full-column cache. Public ByteJSON comparison/hash retain deterministic raw fallback for malformed diagnostic values. Version 3 of [the design](https://github.com/VioletQwQ-0/matrixone/blob/396d983ec8e4027b86b4c92f425a862fcb9e2bf7/docs/design/json_sql_physical_order.md) records these admission owners, unchanged physical relations, resource-policy limits and the homogeneous-query rollout requirement. The separate design PR matrixorigin#28315 is closed and its document is consolidated here. **Independent design approval remains pending; local repair/preflight is not that approval.** Validation for `396d983ec8e4027b86b4c92f425a862fcb9e2bf7`: - This update adds test assertions only; production content is unchanged from acb817e. Shared serialized-byte traversal budget and depth limit100 remain in force. An isolated old-validator baseline fails the alias-work/depth tests; current boundary tests pass. - New assertions verify valid reuse after rejected raw writes and checked decode, retained/empty visible state, failed raw-copy constructor returning nil, and terminal mpool cleanup. Existing admission tests and full validator/vector race packages pass; focused stress counts use recorded timing measurements. - Fresh CGo core/consumer/affected-fixture package checks and ISCP pass. Build/vet and diff-check pass. Focused admission measurements observed zero allocations for small/wide inputs; race is not a complexity or resource-release proof. - Real service canonical JSON ordering/window BVT passes 47/47, including new RANK/DENSE_RANK numeric peers. Retained-run physical merger/write/read tests pass; no rolling-upgrade acceptance is claimed. - The preceding head's GitHub Coverage failed in the SNAPSHOT registry guard, with dependent Coverage blocked; existing matrixorigin#28259 records the same signature. Local CI-tagged SNAPSHOT passes, but the complete issues package fails on a distinct CDC writer-wins waiter timeout (historical context matrixorigin#28282). That CDC case passes in isolation. Both results are retained; the entire package is not called PASS. - Whole-diff schema-v7 review/mapping remains PENDING. The unsupported prior overall PASS stays withdrawn. New-head CI, independent version3 design approval, review decisions and QA remain required. - Continuing correction and reproducible evidence summary: matrixorigin#28086 (comment) QA required: yes. This changes visible SQL comparison/order/hash behavior and corruption handling. Automated coverage reaches direct SQL, multi-key/numeric peers, pruning, checked admission and real merger object readback. Independent design approval, required current-head CI, review approval, and versioned QA on homogeneous query-executing CNs remain required. Keep matrixorigin#28039 open until explicit QA acceptance; this PR does not request issue closure. ### Evidence correction — 2026-09-08 Evidence correction (2026-09-08): the whole-diff semantic PASS previously reported here is withdrawn. The manifest generator copied expected results into observed results and set PASS unconditionally; the validator checked declarations and coverage structure, not their truth. Individual executable results are separate evidence and are being checked against their exact content and test assertions. Overall semantic review is PENDING. This correction does not claim that all tests were invalid or that the code repair failed. Current-head CI, reviewer approval and applicable design/QA gates remain separate. --------- Co-authored-by: XuPeng-SH <[email protected]>
VioletQwQ-0
added a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: issue matrixorigin#28039 ## What this PR does / why we need it: Correct SQL JSON precedence while keeping persisted writer ordering and both raw TAE merger relations unchanged. JSON value-based zone-map pruning fails open; null-count pruning remains available. Numeric peer equality agrees with canonical hash keys. `MIN/MAX(JSON)` remains unsupported and `MIN/MAX(NULL)` retains its previous type. Raw JSON vector writes now validate every descendant before publishing a row. Checked binary, copied, reader, selected-row, legacy and raw-copy decoders reject corrupt non-NULL payloads before publication. Encoders validate their emitted bytes; failed appends/replacements preserve visible state. Same-type copies/unions and the existing sealed objectio V2 cache retain explicit immutable admitted-source preconditions. Direct SQL comparison therefore uses the trusted comparator without a full descendant walk per comparison or a full-column cache. Public ByteJSON comparison/hash retain deterministic raw fallback for malformed diagnostic values. Version 3 of [the design](https://github.com/VioletQwQ-0/matrixone/blob/396d983ec8e4027b86b4c92f425a862fcb9e2bf7/docs/design/json_sql_physical_order.md) records these admission owners, unchanged physical relations, resource-policy limits and the homogeneous-query rollout requirement. The separate design PR matrixorigin#28315 is closed and its document is consolidated here. **Independent design approval remains pending; local repair/preflight is not that approval.** Validation for `396d983ec8e4027b86b4c92f425a862fcb9e2bf7`: - This update adds test assertions only; production content is unchanged from acb817e. Shared serialized-byte traversal budget and depth limit100 remain in force. An isolated old-validator baseline fails the alias-work/depth tests; current boundary tests pass. - New assertions verify valid reuse after rejected raw writes and checked decode, retained/empty visible state, failed raw-copy constructor returning nil, and terminal mpool cleanup. Existing admission tests and full validator/vector race packages pass; focused stress counts use recorded timing measurements. - Fresh CGo core/consumer/affected-fixture package checks and ISCP pass. Build/vet and diff-check pass. Focused admission measurements observed zero allocations for small/wide inputs; race is not a complexity or resource-release proof. - Real service canonical JSON ordering/window BVT passes 47/47, including new RANK/DENSE_RANK numeric peers. Retained-run physical merger/write/read tests pass; no rolling-upgrade acceptance is claimed. - The preceding head's GitHub Coverage failed in the SNAPSHOT registry guard, with dependent Coverage blocked; existing matrixorigin#28259 records the same signature. Local CI-tagged SNAPSHOT passes, but the complete issues package fails on a distinct CDC writer-wins waiter timeout (historical context matrixorigin#28282). That CDC case passes in isolation. Both results are retained; the entire package is not called PASS. - Whole-diff schema-v7 review/mapping remains PENDING. The unsupported prior overall PASS stays withdrawn. New-head CI, independent version3 design approval, review decisions and QA remain required. - Continuing correction and reproducible evidence summary: matrixorigin#28086 (comment) QA required: yes. This changes visible SQL comparison/order/hash behavior and corruption handling. Automated coverage reaches direct SQL, multi-key/numeric peers, pruning, checked admission and real merger object readback. Independent design approval, required current-head CI, review approval, and versioned QA on homogeneous query-executing CNs remain required. Keep matrixorigin#28039 open until explicit QA acceptance; this PR does not request issue closure. ### Evidence correction — 2026-09-08 Evidence correction (2026-09-08): the whole-diff semantic PASS previously reported here is withdrawn. The manifest generator copied expected results into observed results and set PASS unconditionally; the validator checked declarations and coverage structure, not their truth. Individual executable results are separate evidence and are being checked against their exact content and test assertions. Overall semantic review is PENDING. This correction does not claim that all tests were invalid or that the code repair failed. Current-head CI, reviewer approval and applicable design/QA gates remain separate. --------- Co-authored-by: XuPeng-SH <[email protected]>
VioletQwQ-0
added a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
## What type of PR is this? - [x] BUG ## Which issue(s) this PR fixes: issue matrixorigin#28039 ## What this PR does / why we need it: Correct SQL JSON precedence while keeping persisted writer ordering and both raw TAE merger relations unchanged. JSON value-based zone-map pruning fails open; null-count pruning remains available. Numeric peer equality agrees with canonical hash keys. `MIN/MAX(JSON)` remains unsupported and `MIN/MAX(NULL)` retains its previous type. Raw JSON vector writes now validate every descendant before publishing a row. Checked binary, copied, reader, selected-row, legacy and raw-copy decoders reject corrupt non-NULL payloads before publication. Encoders validate their emitted bytes; failed appends/replacements preserve visible state. Same-type copies/unions and the existing sealed objectio V2 cache retain explicit immutable admitted-source preconditions. Direct SQL comparison therefore uses the trusted comparator without a full descendant walk per comparison or a full-column cache. Public ByteJSON comparison/hash retain deterministic raw fallback for malformed diagnostic values. Version 3 of [the design](https://github.com/VioletQwQ-0/matrixone/blob/396d983ec8e4027b86b4c92f425a862fcb9e2bf7/docs/design/json_sql_physical_order.md) records these admission owners, unchanged physical relations, resource-policy limits and the homogeneous-query rollout requirement. The separate design PR matrixorigin#28315 is closed and its document is consolidated here. **Independent design approval remains pending; local repair/preflight is not that approval.** Validation for `396d983ec8e4027b86b4c92f425a862fcb9e2bf7`: - This update adds test assertions only; production content is unchanged from acb817e. Shared serialized-byte traversal budget and depth limit100 remain in force. An isolated old-validator baseline fails the alias-work/depth tests; current boundary tests pass. - New assertions verify valid reuse after rejected raw writes and checked decode, retained/empty visible state, failed raw-copy constructor returning nil, and terminal mpool cleanup. Existing admission tests and full validator/vector race packages pass; focused stress counts use recorded timing measurements. - Fresh CGo core/consumer/affected-fixture package checks and ISCP pass. Build/vet and diff-check pass. Focused admission measurements observed zero allocations for small/wide inputs; race is not a complexity or resource-release proof. - Real service canonical JSON ordering/window BVT passes 47/47, including new RANK/DENSE_RANK numeric peers. Retained-run physical merger/write/read tests pass; no rolling-upgrade acceptance is claimed. - The preceding head's GitHub Coverage failed in the SNAPSHOT registry guard, with dependent Coverage blocked; existing matrixorigin#28259 records the same signature. Local CI-tagged SNAPSHOT passes, but the complete issues package fails on a distinct CDC writer-wins waiter timeout (historical context matrixorigin#28282). That CDC case passes in isolation. Both results are retained; the entire package is not called PASS. - Whole-diff schema-v7 review/mapping remains PENDING. The unsupported prior overall PASS stays withdrawn. New-head CI, independent version3 design approval, review decisions and QA remain required. - Continuing correction and reproducible evidence summary: matrixorigin#28086 (comment) QA required: yes. This changes visible SQL comparison/order/hash behavior and corruption handling. Automated coverage reaches direct SQL, multi-key/numeric peers, pruning, checked admission and real merger object readback. Independent design approval, required current-head CI, review approval, and versioned QA on homogeneous query-executing CNs remain required. Keep matrixorigin#28039 open until explicit QA acceptance; this PR does not request issue closure. ### Evidence correction — 2026-09-08 Evidence correction (2026-09-08): the whole-diff semantic PASS previously reported here is withdrawn. The manifest generator copied expected results into observed results and set PASS unconditionally; the validator checked declarations and coverage structure, not their truth. Individual executable results are separate evidence and are being checked against their exact content and test assertions. Overall semantic review is PENDING. This correction does not claim that all tests were invalid or that the code repair failed. Current-head CI, reviewer approval and applicable design/QA gates remain separate. --------- Co-authored-by: XuPeng-SH <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Design prerequisite for issue #28039 and implementation PR #28086. This proposal does not close either item.
What this PR does / why we need it:
PR #28086 now separates SQL JSON ordering from persisted writer and merger relations. Its independent design gate is still open. This docs-only PR supplies version 1 for a distinct design review before further implementation delivery.
The design covers SQL ordering/hash equality, malformed input domains, exact admission ownership, legacy writer-versus-merger compatibility, mixed-version query limitations, alternatives, hot-path and admission costs, and terminal acceptance tests. It explicitly records that source head
715dc8dfa531c0558355fe83bfa79da0ac9a798adoes not establish the trusted SQL comparison precondition: a new production-entry probe passes a malformed JSON vector through checked deserialization and observes a SQL comparison inconsistent with public fallback ordering.Requested independent decision: approve or request changes on this exact document revision, especially raw-input rejection at admission, preservation of both existing physical relations, and homogeneous query-executor rollout. This PR does not claim design approval, implementation conformance, semantic preflight PASS, or CR closure. Implementation #28086 must remain blocked until design approval and the missing admission/terminal-test work are complete.
Validation: documentation/source contract review and
git diff --check. Supporting source-head verification used locally built native inputs and mo-cgo-test: ten existing named CR regressions passed; the new admission counterexample failed as expected. These are evidence about #28086, not execution coverage supplied by this docs-only PR.BVT: N/A — only a proposed design document changes; there is no executable, SQL, result, or configuration change. The implementation's BVT and QA gates remain in force.