boluor opened a new pull request, #3858:
URL: https://github.com/apache/doris-website/pull/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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]