Repository navigation
fix groupconcat - #24398
Merged
mergify[bot] merged 2 commits intoMay 15, 2026
Merged
fix groupconcat#24398
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? |
ouyuanning
approved these changes
May 14, 2026
aunjgr
approved these changes
May 14, 2026
Contributor
Author
|
@mergify refresh |
Contributor
✅ Pull request refreshed |
XuPeng-SH
approved these changes
May 15, 2026
Contributor
Merge Queue Status
This pull request spent 15 seconds in the queue, including 2 seconds running CI. Required conditions to merge
|
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 #24359
What this PR does / why we need it:
旧代码只传
window.Types[i]一个类型,导致GROUP_CONCAT(a, b, c ORDER BY k)运行时vectors有多个,但argTypes只有一个,最终在groupConcatExec.Fill中越界。核心修复
pkg/sql/colexec/window/window.go:创建 window aggregate executor 时,不要只传window.Types[i]一个类型,而要传当前聚合全部参数的类型。compile/operator.go::constructWindow暂时不建议改 separator 逻辑。当前 parser 对GROUP_CONCAT会始终把 separator 作为最后一个FuncExpr.Exprs追加进去,默认 separator 也是",",所以 constructWindow 剥掉最后一个参数作为 separator 在此版本中是合理的。pr解决:
GROUP_CONCAT多个表达式参数的 panic:GROUP_CONCAT同时使用不同 ORDER BY 的语义问题: