[fix](doc) add GROUP_CONCAT ORDER BY examples to 2.1/3.x group-concat docs#3744
Merged
Merged
Conversation
… docs
The syntax line already advertises `[ORDER BY {<col_name>|<expr>} [ASC|DESC]]`,
but the Examples section in 2.1/3.x only showed the basic and DISTINCT forms,
so users couldn't see how ORDER BY actually attaches inside GROUP_CONCAT.
Backport the two ORDER BY examples that current/4.x already carries:
- `GROUP_CONCAT(value ORDER BY value DESC)` -> "c, c, b, a"
- `GROUP_CONCAT(DISTINCT value ORDER BY value DESC)` -> "c, b, a"
Applied to EN + zh × {2.1, 3.x}.
Reported in apache#3487.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dd8b341 to
985ef72
Compare
Closed
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.
Summary
The
GROUP_CONCATpage syntax already advertises[ORDER BY {<col_name>|<expr>} [ASC|DESC]], but the Examples section on 2.1/3.x only showed the basic andDISTINCTforms, so a reader couldn't see howORDER BYactually attaches insideGROUP_CONCAT. The current/4.x pages already carry twoORDER BYexamples — backport them to 2.1/3.x (EN + zh), with a version note on the DISTINCT + ORDER BY combination so users on older patch releases don't hit a parser error.Added examples (matching the form already shipped in current/4.x):
Version verification (from Doris source)
GROUP_CONCAT(... ORDER BY ...): introduced in Nereids by [feature](Nereids) Support lots of aggregate functions doris#15671 + [fix](Nereids) wrong result of group_concat with order by or null args doris#16081 (Jan 2023, before 2.0 GA) → works on 2.1.x and 3.x.GROUP_CONCAT(DISTINCT ... ORDER BY ...): [fix](nereids)support group_concat with distinct and order by doris#38080, labelsdev/2.1.6-merged, dev/3.0.2-merged→ only valid on 2.1.6+ and 3.0.2+. The page therefore carries an inline:::noteflagging this minimum-version requirement (2.1.6 in the 2.1 docs, 3.0.2 in the 3.x docs).Test plan
GROUP_CONCAT(...)example calls, matching current/4.x.Closes #3487