[fix](doc) v4.x: correct wrong expected outputs in five string-function examples#3860
Open
boluor wants to merge 1 commit into
Open
[fix](doc) v4.x: correct wrong expected outputs in five string-function examples#3860boluor wants to merge 1 commit into
boluor wants to merge 1 commit into
Conversation
…on examples
A native both-language re-check (examples that fail identically in EN and ZH,
so a cross-language diff never surfaces them) found five string-function pages
whose documented example result does not match what the server returns. All
are deterministic and were verified on a fresh Doris 4.1.1 cluster:
1. ends-with.md — ENDS_WITH('testing', 'test') is documented as 1, but
"testing" does not end with "test" → 0.
2. reverse.md — REVERSE('ḍḍumannàri') documented as 'irànnaumuḍḍ' (an extra
'u'); the actual reverse is 'irànnamuḍḍ'.
3. mask-last-n.md — the result block was for a different input
('Hello你好123' → 'Hello你好nnn'); the example SQL is mask_last_n('Helloṭṛ123', 9),
which returns 'Helloṭṛnnn'. Header + value replaced with real output.
4. position.md — POSITION('hello', 'ṭṛì ḍḍumai hello', 8) documented as 13;
'hello' starts at character position 12.
5. mask.md — mask('Test123', 'ABC', 'xyz', '999') documented as 'Xxxx999',
which ignores the custom upper-case replacement the example is meant to
demonstrate; the actual result is 'Axxx999' ('T' → 'A' from 'ABC').
Each fix is applied to both EN and ZH (both carried the same wrong value).
Cluster verification (Doris 4.1.1):
ENDS_WITH('test','test'), ENDS_WITH('testing','test') -> 1 , 0
REVERSE('ṭṛì ḍḍumai'), REVERSE('ḍḍumannàri') -> iamuḍḍ ìṛṭ , irànnamuḍḍ
mask_last_n('Helloṭṛ123', 9) -> Helloṭṛnnn
POSITION('ḍḍumai' IN 'ṭṛì ḍḍumai hello'),
POSITION('hello','ṭṛì ḍḍumai hello',8) -> 5 , 12
mask('Test123','ABC','xyz','999') -> Axxx999
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.
Background
A native both-language re-check — examples that fail identically in EN and ZH, so a cross-language diff never surfaces them — found five string-function pages whose documented example result does not match the server. All are deterministic and verified on a fresh Doris 4.1.1 cluster. Each is wrong in both EN and ZH.
Bugs fixed
ends-with.mdENDS_WITH('testing','test')=10reverse.mdirànnaumuḍḍirànnamuḍḍu; actual reverse ofḍḍumannàrimask-last-n.mdHello你好nnn(headerHello你好123)Helloṭṛnnnmask_last_n('Helloṭṛ123', 9)position.md1312'hello'starts at character position 12 of'ṭṛì ḍḍumai hello'mask.mdXxxx999Axxx999'ABC', soT → A, not the defaultXCluster verification (Doris 4.1.1)
The same fixes apply to
dev(identical wrong values); a follow-up backport PR will cover dev after verification on a master build.🤖 Generated with Claude Code