Skip to content

functions-and-operators: fix JSON_DEPTH() example path to match its own JSON document - #23865

Merged
ti-chi-bot[bot] merged 1 commit into
pingcap:release-8.5from
yahonda:fix-json-depth-example-path-en
Sep 15, 2026
Merged

ti-chi-bot[bot] merged 1 commit into
pingcap:release-8.5from
yahonda:fix-json-depth-example-path-en

Conversation

@yahonda

@yahonda yahonda commented Sep 15, 2026

Copy link
Copy Markdown
Member

What is changed, added or deleted? (Required)

The JSON_DEPTH() example in functions-and-operators/json-functions/json-functions-return.md
lists three path levels — `$`, `$.weather`, and (labeled "weather
current") `$.weather.sunny`. But the actual JSON document used in the
example right below is {"weather": {"current": "sunny"}}, where "sunny"
is the value, not a key — the real third-level path is `$.weather.current`.

Fixes the path in the bullet list to match the document the example
actually queries. (Found while translating this file into Japanese; the
Japanese-side inconsistency this caused is fixed separately.)

Verified against a live TiDB instance (tiup playground, TiDB v8.5.x):

mysql> SELECT JSON_EXTRACT('{"weather": {"current": "sunny"}}', '$.weather.current') AS via_current,
              JSON_EXTRACT('{"weather": {"current": "sunny"}}', '$.weather.sunny') AS via_sunny;
+-------------+-----------+
| via_current | via_sunny |
+-------------+-----------+
| "sunny"     | NULL      |
+-------------+-----------+

$.weather.current correctly resolves to "sunny"; $.weather.sunny does
not exist in the document and returns NULL, confirming the path in the
bullet list was wrong.

Which TiDB version(s) do your changes apply to? (Required)

  • release-8.5 (TiDB 8.5 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8d55b11d-be4d-4fc2-8796-bf8681589acc

📥 Commits

Reviewing files that changed from the base of the PR and between d013b39 and 19fd95d.

📒 Files selected for processing (1)
  • functions-and-operators/json-functions/json-functions-return.md

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The JSON_DEPTH() documentation now identifies the third-level weather path as $.weather.current, matching the surrounding query and output.

Changes

JSON depth documentation

Layer / File(s) Summary
Correct JSON_DEPTH path example
functions-and-operators/json-functions/json-functions-return.md
The third-level path changed from $.weather.sunny to $.weather.current.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 19fd9

The documentation correction aligns the example path with the JSON document and is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely identifies the documentation scope and the JSON_DEPTH() example path correction.
Description check ✅ Passed The description explains the incorrect path, the correction, the affected TiDB version, verification results, and AI involvement. Optional reference links are empty, and the version label uses release…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiancai qiancai added translation/doing This PR's assignee is translating this PR. needs-cherry-pick-master Should cherry pick this PR to master branch. labels Sep 15, 2026
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Sep 15, 2026
@ti-chi-bot ti-chi-bot Bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 15, 2026
@ti-chi-bot

ti-chi-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

[LGTM Timeline notifier]

Timeline:

  • 2026-09-15 09:22:36.897804368 +0000 UTC m=+110602.835461962: ☑️ agreed by qiancai.

@ti-chi-bot

ti-chi-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

@qiancai: Your lgtm message is repeated, so it is ignored.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@qiancai

qiancai commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

/approve

@qiancai qiancai added the lgtm label Sep 15, 2026
@ti-chi-bot

ti-chi-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiancai

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Sep 15, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 0a5d0a7 into pingcap:release-8.5 Sep 15, 2026
12 checks passed
@ti-chi-bot

Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch master: #23872.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm needs-1-more-lgtm Indicates a PR needs 1 more LGTM. needs-cherry-pick-master Should cherry pick this PR to master branch. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. translation/doing This PR's assignee is translating this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants