Skip to content

[fix](doc) dev: correct four wrong SQL-function examples (trim_in / murmur_hash3_64_v2 / json_extract_bigint / uncompress)#3864

Open
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/dev-function-example-corrections
Open

[fix](doc) dev: correct four wrong SQL-function examples (trim_in / murmur_hash3_64_v2 / json_extract_bigint / uncompress)#3864
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/dev-function-example-corrections

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 30, 2026

Four dev function-reference examples whose documented output or SQL did not match actual behavior. Each verified end-to-end on a live master daily build (doris-0.0.0-2e72603618c); fixes use the real cluster output.

1. EN string-functions/trim-in.md — wrong trim() value

The "Comparison with TRIM function" example showed trim('ababccaab','ab') = ababccaab (unchanged), which is wrong — TRIM strips the ab unit from both ends. (ZH page already correct.)

SELECT trim_in('ababccaab','ab'), trim('ababccaab','ab');
+----------------------------+-------------------------+
| trim_in('ababccaab', 'ab') | trim('ababccaab', 'ab') |
+----------------------------+-------------------------+
| cc                         | cca                     |
+----------------------------+-------------------------+

2. ZH encrypt-digest-functions/murmur-hash3-64-v2.md — result table copied from the non-v2 page

The first example queries murmur_hash3_64_v2(...) but the result table (header and values) was copy-pasted from murmur_hash3_64. Replaced with the v2 output (mirrors the EN page):

select murmur_hash3_64_v2(null), murmur_hash3_64_v2("hello"), murmur_hash3_64_v2("hello","world");
-> NULL | -3758069500696749310 | -662943091231200135

3. ZH json-functions/json-extract-bigint.md — wrong function in first example

Called json_extract_int (which returns NULL for 122222222222223 via int overflow) while the header/expected showed json_extract_bigint. Corrected the call to match the header, the expected value, and the EN page:

SELECT json_extract_bigint('{"id": 122222222222223, "name": "doris"}', '$.id'); -> 122222222222223

4. ZH string-functions/uncompress.md — broken third-example query

Query was uncompress(compress(abc)) (abc unquoted → parser error Unknown column 'abc') while its header/expected showed uncompress('abc')NULL. Corrected to match the header, expected, and EN page:

select uncompress('abc'); -> NULL

Scope: dev only (docs/ + i18n/.../current/). No ja-source changes. (murmur_hash3_64_v2, json_extract_bigint also exist in released versions — backport scope will be mapped separately.)

🤖 Generated with Claude Code

…urmur_hash3_64_v2 / json_extract_bigint / uncompress)

Four dev function-reference examples whose documented output or SQL did not match
actual behavior. Each verified end-to-end on a live master daily build
(doris-0.0.0-2e72603618c); fixes use the real cluster output.

1. EN string-functions/trim-in.md — "Comparison with TRIM function" example
   showed trim('ababccaab','ab') = 'ababccaab' (unchanged), which is wrong;
   TRIM removes the 'ab' unit from both ends. Corrected to 'cca'. (ZH already
   correct.)
       SELECT trim_in('ababccaab','ab'), trim('ababccaab','ab');
       +----------------------------+-------------------------+
       | trim_in('ababccaab', 'ab') | trim('ababccaab', 'ab') |
       +----------------------------+-------------------------+
       | cc                         | cca                     |
       +----------------------------+-------------------------+

2. ZH encrypt-digest-functions/murmur-hash3-64-v2.md — first example's result
   table (header + values) was copy-pasted from the non-v2 murmur_hash3_64 page.
   The query is murmur_hash3_64_v2(...); replaced the table with the v2 output
   (mirrors the EN page):
       select murmur_hash3_64_v2(null), murmur_hash3_64_v2("hello"), murmur_hash3_64_v2("hello","world");
       -> NULL | -3758069500696749310 | -662943091231200135

3. ZH json-functions/json-extract-bigint.md — first example called
   json_extract_int (returns NULL on the 122222222222223 value via int overflow)
   while the header/expected showed json_extract_bigint. Corrected the call to
   json_extract_bigint to match the header, the expected 122222222222223, and EN:
       SELECT json_extract_bigint('{"id": 122222222222223, "name": "doris"}', '$.id'); -> 122222222222223

4. ZH string-functions/uncompress.md — third example query was
   uncompress(compress(abc)) (abc unquoted -> parser error "Unknown column 'abc'")
   while its header/expected showed uncompress('abc') -> NULL. Corrected the query
   to uncompress('abc') to match the header, expected, and EN:
       select uncompress('abc'); -> NULL

Scope: dev only (docs/ + i18n current/). No ja-source changes.

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