Repository navigation
feat: support LISTAGG and ARRAY_AGG compatibility - #29166
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Approve for exact head da9a95f20deb9a6334727d0d330f999c0a52e09e.
Fresh exact-head review found no actionable P0/P1/P2 defect. LISTAGG keeps the public spelling while resolving to the existing GROUP_CONCAT implementation, including delimiter/default delimiter, NULL handling, DISTINCT, ordered-set lowering, and the existing truncation/warning contract. ARRAY_AGG deliberately keeps the documented JSON return contract by resolving to JSON_ARRAYAGG; ordinary, DISTINCT, window, NULL, empty-input, parser/deparser round-trip, and plan-resolution paths are covered. Existing canonical function IDs and aggregate implementations are reused, so no new persisted aggregate identity or serialization format is introduced.
Exact-head CI Required, Ubuntu UT, SCA, coverage, PROXY BVT, and pessimistic multi-CN BVT are green. The PR's explicit non-goal—ARRAY_AGG WITHIN GROUP ordering—remains correctly rejected/deferred as a separate executor contract.
Merge Queue Status
This pull request spent 11 seconds in the queue, including 1 second running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
Part of #25110
What this PR does / why we need it:
LISTAGG(value [, delimiter]) WITHIN GROUP (ORDER BY ...)as a compatibility surface over the existing orderedGROUP_CONCATimplementation.DISTINCT, and windowARRAY_AGG(value)forms as an explicit compatibility alias ofJSON_ARRAYAGG.Compatibility contract:
LISTAGGinheritsGROUP_CONCATbehavior for NULL handling, default comma delimiter,DISTINCT, ordering,group_concat_max_len, truncation, and warnings.ARRAY_AGGtherefore returnsJSONand inheritsJSON_ARRAYAGGconversion, NULL,DISTINCT, window, serialization, and persistence behavior.ARRAY_AGG(...) WITHIN GROUP (...); ordered ARRAY aggregation requires a separate executor contract.Validation:
go test ./pkg/sql/parsers/dialect/mysql -count=1go test ./pkg/sql/plan/function -count=1go test ./pkg/sql/plan -count=1pkg/sql/compileGROUP_CONCAT/config testsmo-serviceand executed all new BVT statements against a fresh local launch deployment