docs: add json_path_match function documentation (EN + ZH + v1.0)#2358
Merged
fengjiachun merged 4 commits intomainfrom Mar 6, 2026
Merged
docs: add json_path_match function documentation (EN + ZH + v1.0)#2358fengjiachun merged 4 commits intomainfrom
fengjiachun merged 4 commits intomainfrom
Conversation
Co-authored-by: killme2008 <14142+killme2008@users.noreply.github.com>
Deploying greptime-docs with
|
| Latest commit: |
3b3e4bc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://65bc14be.greptime-docs.pages.dev |
| Branch Preview URL: | https://copilot-update-json-path-mat.greptime-docs.pages.dev |
Copilot
AI
changed the title
[WIP] Update documentation for json_path_match UDF
docs: add json_path_match function documentation (EN + ZH)
Mar 3, 2026
Member
|
The result is 0 or 1: mysql> SELECT json_path_match(parse_json('{"a": 1, "b": 2}'), '$.a == 1');
+------------------------------------------------------------------------+
| json_path_match(parse_json(Utf8("{"a": 1, "b": 2}")),Utf8("$.a == 1")) |
+------------------------------------------------------------------------+
| 1 |
+------------------------------------------------------------------------+
1 row in set (0.02 sec)
mysql> SELECT json_path_match(parse_json('{"a":1,"b":[1,2,3]}'), '$.b[1 to last] >= 2');
+--------------------------------------------------------------------------------------+
| json_path_match(parse_json(Utf8("{"a":1,"b":[1,2,3]}")),Utf8("$.b[1 to last] >= 2")) |
+--------------------------------------------------------------------------------------+
| 1 |
+--------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> SELECT json_path_match(parse_json('{"a":1,"b":[1,2,3]}'), '$.b[0] > 1');
+-----------------------------------------------------------------------------+
| json_path_match(parse_json(Utf8("{"a":1,"b":[1,2,3]}")),Utf8("$.b[0] > 1")) |
+-----------------------------------------------------------------------------+
| 0 |
+-----------------------------------------------------------------------------+And please sync the modification into v1.0. |
Co-authored-by: killme2008 <14142+killme2008@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
docs: add json_path_match function documentation (EN + ZH)
docs: add json_path_match function documentation (EN + ZH + v1.0)
Mar 5, 2026
Member
|
@copilot You fogot the chinese doc in v1.0 |
Co-authored-by: killme2008 <14142+killme2008@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the
json_path_matchUDF introduced in GreptimeTeam/greptimedb#4864.What's Changed in this PR
Added
json_path_match(json, path)to the Validation section of the JSON functions reference, alongside the existingjson_path_exists. Covers:1or0whether the JSON value satisfies the JSONPath predicate expression (e.g.$.a == 1,$.b[1 to last] >= 2)NULLwhen the JSON value isNULLor the path is invalid/not a predicate1,0, andNULLoutcomesUpdated all four relevant files:
docs/reference/sql/functions/json.md(EN current)i18n/zh/docusaurus-plugin-content-docs/current/reference/sql/functions/json.md(ZH current)versioned_docs/version-1.0/reference/sql/functions/json.md(EN v1.0)i18n/zh/docusaurus-plugin-content-docs/version-1.0/reference/sql/functions/json.md(ZH v1.0)Checklist
sidebars.tsmatches the current document structure when you changed the document structure.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.