[fix](doc) v3.x: fix ZH APPEND_TRAILING_CHAR_IF_ABSENT examples#3855
Merged
morningman merged 1 commit intoMay 30, 2026
Merged
Conversation
The ZH page kept an older combined example whose third call,
APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'cd'), was documented as returning
'accd'. That is wrong: `<trailing_char>` is a single trailing character, and
passing a 2-character string returns NULL on the server. The EN page was
already rewritten into five focused single-character examples; this brings ZH
in line with EN.
Cluster verification (Doris 3.1.4-rc02) — actual output pasted into the doc:
SELECT APPEND_TRAILING_CHAR_IF_ABSENT('a', 'c'); -> ac
SELECT APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'c'); -> ac
SELECT APPEND_TRAILING_CHAR_IF_ABSENT('', '/'); -> /
SELECT APPEND_TRAILING_CHAR_IF_ABSENT(NULL, 'c'); -> NULL
SELECT APPEND_TRAILING_CHAR_IF_ABSENT('acf', 'ṛ'); -> acfṛ
-- and confirming the removed case is wrong:
SELECT APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'cd'); -> NULL (doc said 'accd')
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
morningman
pushed a commit
that referenced
this pull request
May 30, 2026
…3858) Backport of #3855 to `version-2.1`. ## Problem On v2.1 **both** the EN and ZH pages keep the old combined example whose third call, `APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'cd')`, is documented as returning `accd`. That is wrong: `<trailing_char>` is a **single** trailing character, and passing a 2-character string returns `NULL`. (On v3.x only ZH needed this — EN had already been rewritten. On v2.1 neither language was rewritten, so this PR fixes both.) ## Fix Replace the combined example with five focused single-character examples, matching the corrected v3.x EN page. ## Cluster verification (Doris 2.1.11-rc01) ``` SELECT APPEND_TRAILING_CHAR_IF_ABSENT('a', 'c'); -> ac SELECT APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'c'); -> ac SELECT APPEND_TRAILING_CHAR_IF_ABSENT('', '/'); -> / SELECT APPEND_TRAILING_CHAR_IF_ABSENT(NULL, 'c'); -> NULL SELECT APPEND_TRAILING_CHAR_IF_ABSENT('acf', 'ṛ'); -> acfṛ -- and confirming the removed case is wrong: SELECT APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'cd'); -> NULL (doc previously said 'accd') ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The ZH page kept an older combined example whose third call,
APPEND_TRAILING_CHAR_IF_ABSENT('ac', 'cd'), was documented as returningaccd. That is wrong:<trailing_char>is a single trailing character, and passing a 2-character string returnsNULLon the server.The EN page was already rewritten into five focused single-character examples; this PR brings ZH in line with EN (EN is the reference and is unchanged).
Cluster verification (Doris 3.1.4-rc02)
Actual output, pasted into the doc:
Confirming the removed case is genuinely wrong:
🤖 Generated with Claude Code