Repository navigation
fix: allow group_concat fields above 64 KiB - #28702
Conversation
Remove the obsolete uint16 field limit while preserving the uint32 payload contract, allocation accounting, and bounded spill behavior.
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? |
Correct the JSON length expectations to include the space after the object separator. Preserve independent TEXT/BLOB size checks at and above the former 64-KiB boundary.
Merge Queue Status
This pull request spent 3 minutes 50 seconds in the queue, with no time running CI. Waiting for any of
All conditions
ReasonPull request #28702 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
XuPeng-SH
left a comment
There was a problem hiding this comment.
Follow-up verification note: after my review, the branch advanced from 8c5983df9c716a9c091e33d1dab711399bb8534d to d6ef8c01da65aa6c7c7499e7c669741388275730 by merging latest main. The current PR diff is still the same nine GROUP_CONCAT/shuffle files reviewed above; the newly triggered CI for d6ef8c0 is now in progress, so the prior green CI was for the pre-merge head, not this exact head. I am not waiting for the rerun.
…8801) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #28653, #28249, and #28250. This PR only changes regression tests; it does not itself fix or close these issues. The GROUP_CONCAT production fix was merged in #28702, and the user-level lock behavior fix was merged in #28783. ## What this PR does / why we need it: This test-only follow-up consolidates related SQL-function coverage while preserving distinct test oracles: - Keeps the existing 70,000-byte text case and adds exact-output JSON and float32-vector cases through the real GROUP_CONCAT ordered-spill path. JSON and vector rendered outputs are each 65,536 bytes. The test asserts spill occurred before flush, checks complete output bytes, and verifies memory-pool cleanup. - Moves the three unique free-lock timeout-type probes (DOUBLE `0`, DECIMAL `0.5`, and DOUBLE `0.5`) into the broader `user_lock.sql` case, then removes the duplicate `func_user_lock.test/.result`. Existing lock lifecycle, contention, NULL-name, NULL-timeout, and case-insensitive checks remain. The precise DECIMAL-vs-DOUBLE rounding behavior remains owned by `TestGetLockDecimalTimeoutUsesDecimalRounding`. - Removes one adjacent, identical basic GROUP_CONCAT SELECT and its duplicate expected-output block. The first assertion remains; this was not a controlled cache/reuse test, and no measured runtime improvement is claimed. No production code or behavior changes. ## Test Plan - [x] Focused CGo UTs: `TestGroupConcatLargeValuesAcrossOrderedSpill`, `TestAppendGroupConcatDataCoversTypes`, and `TestGroupConcatVectorValuesAcrossFinalizers` — PASS. - [x] Full `./pkg/sql/colexec/aggexec` test package — PASS (1.346s). - [x] `go vet -mod=readonly ./pkg/sql/colexec/aggexec` with repository-matched CGo flags — PASS. - [x] Incremental `golangci-lint` for `./pkg/sql/colexec/aggexec` against the PR base — 0 issues. - [x] On 55, using a service built from current main `68860942354a7deb58158197e1e458d6094ec1bd` in an isolated network namespace, ran each modified BVT twice with mo-tester: - `user_lock.sql`: 67/67 passed on both runs. - `function_group_concat.sql`: 228/228 passed on both runs. - [x] `gofmt` and `git diff --check` — PASS. QA can run the two BVT cases with `./run.sh -n -g -p <path-to-case.sql>` against a test-owned MatrixOne instance. Both cases clean up their database/table state and were rerun successfully on the same isolated instance. CI was not awaited for this update.
## 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 matrixorigin#28653 ## What this PR does / why we need it: GROUP_CONCAT rejected individual text, binary, and JSON fields larger than 65,535 bytes, although its length-delimited payload and spill format already use uint32 field lengths. Valid large values therefore failed independently of group_concat_max_len. Remove the obsolete 16-bit field limit from text, binary, JSON, and vector output formatting. Keep the existing uint32 payload encoder, spill format, and JSON aggregate APIs unchanged; the fix does not introduce a new generic encoding protocol. Keep group_concat_max_len as the output limit and retain existing spill and allocation ownership. Cover the 65,535/65,536-byte boundary, 70,000-byte values, the 65,536-byte vector boundary, JSON's formatted representation, and exact recovery through ordered spill. Preserve the original shuffle abort cause when a sibling reaches Prepare after pool retirement. Cancellation from an early-finished consumer must remain distinguishable from a substantive execution error; retain the existing admission and cleanup safeguards. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…trixorigin#28801) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to matrixorigin#28653, matrixorigin#28249, and matrixorigin#28250. This PR only changes regression tests; it does not itself fix or close these issues. The GROUP_CONCAT production fix was merged in matrixorigin#28702, and the user-level lock behavior fix was merged in matrixorigin#28783. ## What this PR does / why we need it: This test-only follow-up consolidates related SQL-function coverage while preserving distinct test oracles: - Keeps the existing 70,000-byte text case and adds exact-output JSON and float32-vector cases through the real GROUP_CONCAT ordered-spill path. JSON and vector rendered outputs are each 65,536 bytes. The test asserts spill occurred before flush, checks complete output bytes, and verifies memory-pool cleanup. - Moves the three unique free-lock timeout-type probes (DOUBLE `0`, DECIMAL `0.5`, and DOUBLE `0.5`) into the broader `user_lock.sql` case, then removes the duplicate `func_user_lock.test/.result`. Existing lock lifecycle, contention, NULL-name, NULL-timeout, and case-insensitive checks remain. The precise DECIMAL-vs-DOUBLE rounding behavior remains owned by `TestGetLockDecimalTimeoutUsesDecimalRounding`. - Removes one adjacent, identical basic GROUP_CONCAT SELECT and its duplicate expected-output block. The first assertion remains; this was not a controlled cache/reuse test, and no measured runtime improvement is claimed. No production code or behavior changes. ## Test Plan - [x] Focused CGo UTs: `TestGroupConcatLargeValuesAcrossOrderedSpill`, `TestAppendGroupConcatDataCoversTypes`, and `TestGroupConcatVectorValuesAcrossFinalizers` — PASS. - [x] Full `./pkg/sql/colexec/aggexec` test package — PASS (1.346s). - [x] `go vet -mod=readonly ./pkg/sql/colexec/aggexec` with repository-matched CGo flags — PASS. - [x] Incremental `golangci-lint` for `./pkg/sql/colexec/aggexec` against the PR base — 0 issues. - [x] On 55, using a service built from current main `68860942354a7deb58158197e1e458d6094ec1bd` in an isolated network namespace, ran each modified BVT twice with mo-tester: - `user_lock.sql`: 67/67 passed on both runs. - `function_group_concat.sql`: 228/228 passed on both runs. - [x] `gofmt` and `git diff --check` — PASS. QA can run the two BVT cases with `./run.sh -n -g -p <path-to-case.sql>` against a test-owned MatrixOne instance. Both cases clean up their database/table state and were rerun successfully on the same isolated instance. CI was not awaited for this update.
## 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 matrixorigin#28653 ## What this PR does / why we need it: GROUP_CONCAT rejected individual text, binary, and JSON fields larger than 65,535 bytes, although its length-delimited payload and spill format already use uint32 field lengths. Valid large values therefore failed independently of group_concat_max_len. Remove the obsolete 16-bit field limit from text, binary, JSON, and vector output formatting. Keep the existing uint32 payload encoder, spill format, and JSON aggregate APIs unchanged; the fix does not introduce a new generic encoding protocol. Keep group_concat_max_len as the output limit and retain existing spill and allocation ownership. Cover the 65,535/65,536-byte boundary, 70,000-byte values, the 65,536-byte vector boundary, JSON's formatted representation, and exact recovery through ordered spill. Preserve the original shuffle abort cause when a sibling reaches Prepare after pool retirement. Cancellation from an early-finished consumer must remain distinguishable from a substantive execution error; retain the existing admission and cleanup safeguards. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…trixorigin#28801) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to matrixorigin#28653, matrixorigin#28249, and matrixorigin#28250. This PR only changes regression tests; it does not itself fix or close these issues. The GROUP_CONCAT production fix was merged in matrixorigin#28702, and the user-level lock behavior fix was merged in matrixorigin#28783. ## What this PR does / why we need it: This test-only follow-up consolidates related SQL-function coverage while preserving distinct test oracles: - Keeps the existing 70,000-byte text case and adds exact-output JSON and float32-vector cases through the real GROUP_CONCAT ordered-spill path. JSON and vector rendered outputs are each 65,536 bytes. The test asserts spill occurred before flush, checks complete output bytes, and verifies memory-pool cleanup. - Moves the three unique free-lock timeout-type probes (DOUBLE `0`, DECIMAL `0.5`, and DOUBLE `0.5`) into the broader `user_lock.sql` case, then removes the duplicate `func_user_lock.test/.result`. Existing lock lifecycle, contention, NULL-name, NULL-timeout, and case-insensitive checks remain. The precise DECIMAL-vs-DOUBLE rounding behavior remains owned by `TestGetLockDecimalTimeoutUsesDecimalRounding`. - Removes one adjacent, identical basic GROUP_CONCAT SELECT and its duplicate expected-output block. The first assertion remains; this was not a controlled cache/reuse test, and no measured runtime improvement is claimed. No production code or behavior changes. ## Test Plan - [x] Focused CGo UTs: `TestGroupConcatLargeValuesAcrossOrderedSpill`, `TestAppendGroupConcatDataCoversTypes`, and `TestGroupConcatVectorValuesAcrossFinalizers` — PASS. - [x] Full `./pkg/sql/colexec/aggexec` test package — PASS (1.346s). - [x] `go vet -mod=readonly ./pkg/sql/colexec/aggexec` with repository-matched CGo flags — PASS. - [x] Incremental `golangci-lint` for `./pkg/sql/colexec/aggexec` against the PR base — 0 issues. - [x] On 55, using a service built from current main `68860942354a7deb58158197e1e458d6094ec1bd` in an isolated network namespace, ran each modified BVT twice with mo-tester: - `user_lock.sql`: 67/67 passed on both runs. - `function_group_concat.sql`: 228/228 passed on both runs. - [x] `gofmt` and `git diff --check` — PASS. QA can run the two BVT cases with `./run.sh -n -g -p <path-to-case.sql>` against a test-owned MatrixOne instance. Both cases clean up their database/table state and were rerun successfully on the same isolated instance. CI was not awaited for this update.
## 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 matrixorigin#28653 ## What this PR does / why we need it: GROUP_CONCAT rejected individual text, binary, and JSON fields larger than 65,535 bytes, although its length-delimited payload and spill format already use uint32 field lengths. Valid large values therefore failed independently of group_concat_max_len. Remove the obsolete 16-bit field limit from text, binary, JSON, and vector output formatting. Keep the existing uint32 payload encoder, spill format, and JSON aggregate APIs unchanged; the fix does not introduce a new generic encoding protocol. Keep group_concat_max_len as the output limit and retain existing spill and allocation ownership. Cover the 65,535/65,536-byte boundary, 70,000-byte values, the 65,536-byte vector boundary, JSON's formatted representation, and exact recovery through ordered spill. Preserve the original shuffle abort cause when a sibling reaches Prepare after pool retirement. Cancellation from an early-finished consumer must remain distinguishable from a substantive execution error; retain the existing admission and cleanup safeguards. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…trixorigin#28801) ## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to matrixorigin#28653, matrixorigin#28249, and matrixorigin#28250. This PR only changes regression tests; it does not itself fix or close these issues. The GROUP_CONCAT production fix was merged in matrixorigin#28702, and the user-level lock behavior fix was merged in matrixorigin#28783. ## What this PR does / why we need it: This test-only follow-up consolidates related SQL-function coverage while preserving distinct test oracles: - Keeps the existing 70,000-byte text case and adds exact-output JSON and float32-vector cases through the real GROUP_CONCAT ordered-spill path. JSON and vector rendered outputs are each 65,536 bytes. The test asserts spill occurred before flush, checks complete output bytes, and verifies memory-pool cleanup. - Moves the three unique free-lock timeout-type probes (DOUBLE `0`, DECIMAL `0.5`, and DOUBLE `0.5`) into the broader `user_lock.sql` case, then removes the duplicate `func_user_lock.test/.result`. Existing lock lifecycle, contention, NULL-name, NULL-timeout, and case-insensitive checks remain. The precise DECIMAL-vs-DOUBLE rounding behavior remains owned by `TestGetLockDecimalTimeoutUsesDecimalRounding`. - Removes one adjacent, identical basic GROUP_CONCAT SELECT and its duplicate expected-output block. The first assertion remains; this was not a controlled cache/reuse test, and no measured runtime improvement is claimed. No production code or behavior changes. ## Test Plan - [x] Focused CGo UTs: `TestGroupConcatLargeValuesAcrossOrderedSpill`, `TestAppendGroupConcatDataCoversTypes`, and `TestGroupConcatVectorValuesAcrossFinalizers` — PASS. - [x] Full `./pkg/sql/colexec/aggexec` test package — PASS (1.346s). - [x] `go vet -mod=readonly ./pkg/sql/colexec/aggexec` with repository-matched CGo flags — PASS. - [x] Incremental `golangci-lint` for `./pkg/sql/colexec/aggexec` against the PR base — 0 issues. - [x] On 55, using a service built from current main `68860942354a7deb58158197e1e458d6094ec1bd` in an isolated network namespace, ran each modified BVT twice with mo-tester: - `user_lock.sql`: 67/67 passed on both runs. - `function_group_concat.sql`: 228/228 passed on both runs. - [x] `gofmt` and `git diff --check` — PASS. QA can run the two BVT cases with `./run.sh -n -g -p <path-to-case.sql>` against a test-owned MatrixOne instance. Both cases clean up their database/table state and were rerun successfully on the same isolated instance. CI was not awaited for this update.
What type of PR is this?
Which issue(s) this PR fixes:
issue #28653
What this PR does / why we need it:
GROUP_CONCAT rejected individual text, binary, and JSON fields larger than 65,535 bytes, although its length-delimited payload and spill format already use uint32 field lengths. Valid large values therefore failed independently of group_concat_max_len.
Remove the obsolete 16-bit field limit from text, binary, JSON, and vector output formatting. Keep the existing uint32 payload encoder, spill format, and JSON aggregate APIs unchanged; the fix does not introduce a new generic encoding protocol.
Keep group_concat_max_len as the output limit and retain existing spill and allocation ownership. Cover the 65,535/65,536-byte boundary, 70,000-byte values, the 65,536-byte vector boundary, JSON's formatted representation, and exact recovery through ordered spill.
Preserve the original shuffle abort cause when a sibling reaches Prepare after pool retirement. Cancellation from an early-finished consumer must remain distinguishable from a substantive execution error; retain the existing admission and cleanup safeguards.