Repository navigation
fix(json): preserve arrayagg temporal and year values - #28094
Merged
mergify[bot] merged 3 commits intoSep 14, 2026
Merged
mergify[bot] merged 3 commits into
mergify[bot] merged 3 commits into
Conversation
VioletQwQ-0
force-pushed
the
codex/28061-json-arrayagg-values
branch
from
September 4, 2026 03:53
14fe578 to
222a35f
Compare
1 of 7 tasks
VioletQwQ-0
force-pushed
the
codex/28061-json-arrayagg-values
branch
from
September 4, 2026 05:05
222a35f to
69ffc89
Compare
XuPeng-SH
force-pushed
the
codex/28061-json-arrayagg-values
branch
from
September 7, 2026 23:28
dcc81a5 to
a1a7957
Compare
XuPeng-SH
added a commit
that referenced
this pull request
Sep 8, 2026
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue #28056 issue #28057 issue #28058 issue #28060 ## What this PR does / why we need it: Add a shared resolved-SQL-value converter for JSON_OBJECT values, JSON_ARRAY values and JSON_SET values. The foundation PR #28092 is merged; there is no remaining unmerged parent dependency. Temporal values use six fractional digits. TIMESTAMP uses the session timezone and retains the DATETIME atom kind. YEAR becomes a numeric atom whose public JSON type remains INTEGER. Binary values use MySQL tags; GEOMETRY follows the WKB-to-GeoJSON cast path and invalid WKB remains an error. Constructor BIT uses tagged TpCodeBlob type16 while CAST(BIT AS JSON) retains its legacy representation. Prepared numeric/boolean provenance, SQL NULL and JSON_OBJECT member-name conversion remain intact. This maintenance update also closes the current-head binary-domain compatibility finding: - JSON constructor and `MEMBER OF` now share concrete binary subtype conversion: `BINARY=254`, `VARBINARY=15`, and `BLOB=252`. - Concrete prepared binary metadata takes precedence over the metadata-free legacy binary-string path, and the admitted `MOProtocolVersion` is threaded through the conversion. - BIT constructor values retain tagged type16 representation, prepared BIT width rejection remains unchanged, and NULL/nonmatch/large-array behavior is covered. Validation for `2fd4392ddf1b7d1c5c2e7c03e07581637103b2c8`: - Fixes the direct prepared JSON_ARRAY_APPEND omission, alongside the existing ARRAY/OBJECT/SET/INSERT/REPLACE handling. Only modifier value slots retain concrete types; documents, paths and member names retain existing conversion. - The new actual COM_STMT_EXECUTE packet/planner regression fails on parent 5a7ecd5 and passes with this change at protocol 51/52, including NULL and rebinding. ARRAY_APPEND's SQL NULL behavior is preserved. - Stable-content controlled CGo frontend/plan/function packages, rebuilt service, package vet and diff-check pass. Committed patch matches the tested working diff byte-for-byte. - Canonical BVT: ARRAY/OBJECT/SET/TYPE/UNQUOTE/binary MEMBER OF/ARRAY_APPEND, 312 assertions pass. Real Connector/J ServerPreparedStatement socket tests separately pass 30 terminal assertions across six constructors. Socket current-protocol results are distinct from fixture protocol-51 checks. - Whole-diff semantic review: PENDING. The prior generated overall PASS is withdrawn. New-head CI, reviewer decisions and QA remain separate gates. - Reproducible evidence and current correction: #28093 (comment) BVT: the complete PR extends canonical `.sql/.result` files for the functions above. The new ARRAY_APPEND BVT checks typed BLOB and SQL NULL; the frontend packet regression captures the direct prepared defect. Downstream dependency and merge order: - #28094 consumes this PR's shared converter and must not merge before #28093. It remains a cumulative stack until it is rebased after this PR merges. - #28032 is a later follow-up and must wait for #28094 because it updates the same canonical `func_json_agg` BVT files; its branch must be rebased after #28094 merges. - Required order: #28092 (merged) → #28093 → #28094 → #28032. - After any head update, re-read the exact head and rerun the required checks before merge. QA required: yes — exact MySQL 8 comparison, single/multi-CN, binary prepared protocol, timezone, restart/readback, generated-column and index scenarios remain formal tester gates. Ready for review does not mean QA or CI is complete. ### 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]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
VioletQwQ-0
force-pushed
the
codex/28061-json-arrayagg-values
branch
from
September 8, 2026 15:31
a1a7957 to
6e05794
Compare
VioletQwQ-0
force-pushed
the
codex/28061-json-arrayagg-values
branch
from
September 8, 2026 15:48
6e05794 to
aed3f36
Compare
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? |
Contributor
Merge Queue Status
This pull request spent 4 minutes 22 seconds in the queue, with no time running CI. ReasonThe pull request #28094 has been manually updated Requeued — the merge queue status continues in this comment ↓. |
Contributor
Merge Queue Status
This pull request spent 19 seconds in the queue, including 1 second running CI. Required conditions to merge
|
This was referenced Sep 14, 2026
2 tasks done
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:
issue #28061
What this PR does / why we need it:
After #28093 merged, this PR is rebased onto the current
mainand contains only the independent JSON_ARRAYAGG delta. It routes TIME, DATETIME, and YEAR inputs through the shared typed conversion: TIME and DATETIME retain their ByteJson kinds with six fractional digits, YEAR is numeric with public JSON typeINTEGER, and DISTINCT continues to hash the original SQL vector.Regular construction, allocation preflight, accounted append, merge, and spill reload use the same atom representation and encoded size. Coverage includes regular/accounted equality, state-free preflight, one-byte-short allocation failure, partial merge, spill save/reload, NULL, DISTINCT, and prepared YEAR.
Dependency and merge order:
main@b7eca642ce9b6a4c2ebeca3be378d016d19ff9c1and is ready for fresh review. The PR is Ready for maintainer review; QA remains a separate acceptance gate.func_json_agg.test/result; it must wait for this PR, then rebase and replay its numeric-key additions.QA required: yes — issue #28061 remains open until exact-version, MySQL comparison, and topology tester evidence completes.
Production terminal covered by automation: JSON_ARRAYAGG TIME/DATETIME/YEAR, NULL, DISTINCT, prepared YEAR, regular/accounted/preflight, merge, spill, and allocation failure.
Remaining QA: exact MySQL 8 comparison, single/multi-CN, timezone and persisted-read scenarios; TIMESTAMP timezone and binary/BIT/geometry ARRAYAGG admission remain explicit follow-up scope.
Validation at exact local head
aed3f36ba927b46b10485ce1a45c448ca5ac76ec(baseb7eca642ce9b6a4c2ebeca3be378d016d19ff9c1):GOWORK=off go list/build/vet -mod=readonly ./pkg/sql/colexec/aggexec: PASSmo-cgo-testARRAYAGG set (6 tests): PASSmo-cgo-test -count=1 ./pkg/sql/colexec/aggexec: PASSPASS semantic=PASS, diff8277dd6ce07a3fbfb69034e19817bceccf1946a7a6642e6d88372b676d8d0f9btest/distributed/cases/function/func_json_agg.test/result: retained; local execution is pending because this host has no Java runtime. CI/QA remains the acceptance gate.git diff --check: PASS