Skip to content

[fix](doc) dev: correct wrong expected outputs in five string-function examples#3861

Open
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/string-func-wrong-expected-dev
Open

[fix](doc) dev: correct wrong expected outputs in five string-function examples#3861
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/string-func-wrong-expected-dev

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 30, 2026

Backport of #3860 to dev (docs/ + i18n/zh-CN/.../current/).

The same five string-function example pages carry an expected result that does not match the server; each is wrong in both EN and ZH. Verified on a Doris master build (doris-0.0.0-trunk-97b77e6cda).

Page Documented Correct (cluster) Why
ends-with.md ENDS_WITH('testing','test') = 1 0 "testing" does not end with "test"
reverse.md irànnaumuḍḍ irànnamuḍḍ spurious extra u; actual reverse of ḍḍumannàri
mask-last-n.md Hello你好nnn (header Hello你好123) Helloṭṛnnn result block was for a different input than the example SQL mask_last_n('Helloṭṛ123', 9)
position.md 13 12 'hello' starts at character position 12
mask.md Xxxx999 Axxx999 example demonstrates a custom upper-case replacement 'ABC', so T → A, not default X

Cluster verification (Doris master build)

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

🤖 Generated with Claude Code

…n examples

Backport of apache#3860 to dev (docs/ + current/).
Same five string-function example pages carry an expected result that does not
match the server; each is wrong in both EN and ZH. Verified on a Doris master
build (doris-0.0.0-trunk-97b77e6cda).

1. ends-with.md     ENDS_WITH('testing','test')  1 -> 0
2. reverse.md       REVERSE('ḍḍumannàri') 'irànnaumuḍḍ' -> 'irànnamuḍḍ'
3. mask-last-n.md   result block was for a different input ('Hello你好123');
                    mask_last_n('Helloṭṛ123', 9) -> 'Helloṭṛnnn'
4. position.md      POSITION('hello','ṭṛì ḍḍumai hello',8)  13 -> 12
5. mask.md          mask('Test123','ABC','xyz','999') 'Xxxx999' -> 'Axxx999'

Cluster verification (Doris master build):

    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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant