functions-and-operators: fix JSON_DEPTH() example path to match its own JSON document (#23865) - #23872
functions-and-operators: fix JSON_DEPTH() example path to match its own JSON document (#23865)#23872ti-chi-bot wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe ChangesJSON function documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Other Merge Risk: ⚪ Minimal · up to The example now documents the JSON path used by its own JSON document, so it is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
This is an automated cherry-pick of #23865
What is changed, added or deleted? (Required)
The
JSON_DEPTH()example infunctions-and-operators/json-functions/json-functions-return.mdlists three path levels —
`$`,`$.weather`, and (labeled "weathercurrent")
`$.weather.sunny`. But the actual JSON document used in theexample 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):$.weather.currentcorrectly resolves to"sunny";$.weather.sunnydoesnot exist in the document and returns
NULL, confirming the path in thebullet list was wrong.
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
🤖 Generated with Claude Code
Summary by CodeRabbit
JSON_DEPTH()example path to match the accompanying JSON document and SQL query.