Repository navigation
fix: honor group_concat_max_len - #26199
mergify[bot] merged 4 commits into
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.
Blocking correctness issue: group_concat_max_len is resolved only while the operator tree is constructed, so a cache-eligible TP prepared statement captures the value at PREPARE time. createPrepareStmt stores that compiled pipeline, later EXECUTEs only call Compile.Reset, and Group.Reset recreates its aggregate from the unchanged Aggs.ExtraConfig.
Repro:
set session group_concat_max_len = 1024;
prepare s from 'select group_concat(s order by s separator "") from t';
set session group_concat_max_len = 5;
execute s;For a small t containing aa, bb, cc, this continues using 1024 and returns aabbcc instead of aabbc; changing the limit in the opposite direction leaves the result incorrectly truncated. Fresh statements and the new BVT do not exercise prepared compile reuse.
Please refresh this dynamic session value for every execution (or invalidate/rebuild the cached compile when it changes) and add a prepared-statement regression test.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed head 40b143e. The previous blocker is fixed: cached prepared executions now refresh the group_concat configuration in Compile.Reset across Group/MergeGroup/Window while preserving the separator, and the regression BVT covers changing group_concat_max_len between EXECUTEs. I also rechecked scope traversal, remote serialization, and Reset/Free/error-path lifecycle. No blocking issues found. Targeted CGo tests pass for aggexec, compile, and frontend.
Merge Queue Status
This pull request spent 1 hour 21 minutes 58 seconds in the queue, including 52 minutes 28 seconds running CI. Required conditions to merge
|
fix: honor group_concat_max_len Approved by: @heni02, @XuPeng-SH
fix: honor group_concat_max_len Approved by: @heni02, @XuPeng-SH
fix: honor group_concat_max_len Approved by: @heni02, @XuPeng-SH
What type of PR is this?
Which issue(s) this PR fixes:
issue #25370
What this PR does / why we need it:
fix: honor group_concat_max_len