Skip to content

[fix](doc) json-type.md: replace stale jsonb_type headers, fix zh fences, mirror examples#3796

Open
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/json-type-align-examples-and-fix-headers
Open

[fix](doc) json-type.md: replace stale jsonb_type headers, fix zh fences, mirror examples#3796
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/json-type-align-examples-and-fix-headers

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 26, 2026

Summary

Doc page (4.x): `scalar-functions/json-functions/json-type.md` (EN + ZH).

Three problems addressed:

  1. EN — stale internal column header. Result blocks for the first two examples show the column header as `jsonb_type(cast('{"name":...}' as JSON), '$.name')`. On Apache Doris 4.1.1 the cluster returns the column header as the SQL itself, preserving case — `JSON_TYPE('{"name":...}', '$.name')`. `jsonb_type` was the internal name in the early JSONB era; current versions print `JSON_TYPE`. Replaced with what the cluster prints today.

  2. ZH — bare code fences on result blocks. All six result blocks were fenced with ```````` instead of ````text````, so docusaurus had no language hint and rendered the ASCII grid with no syntax-highlighting tag.

  3. Each side had two type-coverage examples the other didn't. EN had `string` and `int`; ZH had `double` and `bool`. Mirrored them so both pages now cover all four primitive types in the same order, followed by the same NULL / missing-path / invalid-path examples.

Verification

All 8 examples were run against a single-node Apache Doris 4.1.1 cluster — the result blocks in this PR are the verbatim mysql client output.

Test plan

  • Run each of the 8 SQL examples on a 4.1.1 cluster — each result block matches.
  • EN and ZH now have the same 8 examples in the same order.
  • All result blocks tagged `text`.

🤖 Generated with Claude Code

…ag zh result fences as text; mirror examples

Three issues, fixed on both sides:

1. EN result blocks for the first two examples show the column header
   as `jsonb_type(cast('...' as JSON), '$.name')`. The cluster actually
   returns the SQL verbatim, preserving its case — `JSON_TYPE('...',
   '$.name')`. `jsonb_type` was the internal name in the early JSONB
   era; current versions show `JSON_TYPE`. Replaced the headers with
   what the cluster prints today on Apache Doris 4.1.1.

2. ZH result blocks were fenced with bare ```` ``` ```` instead of
   ```` ```text ````, so docusaurus did not get a language hint.
   Tagged them all as `text`.

3. Each side had two type-coverage examples the other didn't (EN had
   string + int, ZH had double + bool). Mirrored them so both pages
   now cover the four primitive types in the same order.

Co-Authored-By: Claude Opus 4.7 (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