This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new ab32e648050 [doc](function) doris support json-remove (#2829)
ab32e648050 is described below
commit ab32e648050c1e514483c4e436f8382115a8d5fd
Author: lw112 <[email protected]>
AuthorDate: Thu Sep 11 17:57:10 2025 +0800
[doc](function) doris support json-remove (#2829)
Apache Doris: https://github.com/apache/doris/pull/55575
## Versions
- [x] dev
- [ ] 3.0
- [ ] 2.1
- [ ] 2.0
## Languages
- [x] Chinese
- [x] English
## Docs Checklist
- [ ] Checked by AI
- [ ] Test Cases Built
---
.../scalar-functions/json-functions/json-remove.md | 70 ++++++++++++++++++++++
.../scalar-functions/json-functions/json-remove.md | 70 ++++++++++++++++++++++
2 files changed, 140 insertions(+)
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/json-functions/json-remove.md
b/docs/sql-manual/sql-functions/scalar-functions/json-functions/json-remove.md
new file mode 100644
index 00000000000..92cfc1f5f00
--- /dev/null
+++
b/docs/sql-manual/sql-functions/scalar-functions/json-functions/json-remove.md
@@ -0,0 +1,70 @@
+---
+{
+ "title": "JSON_SET",
+ "language": "en"
+}
+---
+
+## Description
+The `JSON_REMOVE` function is used to remove data from a JSON document and
return the result.
+
+## Syntax
+```sql
+JSON_REMOVE (<json_object>, path[, path] ...)
+```
+
+## Parameters
+- `<json_object>` JSON type expression, the target to be deleted.
+- `<path>` String type expression, path parameters are evaluated in
left-to-right order. The JSON document produced by evaluating a path becomes
the new value for the next path evaluation.
+
+## Return Value
+- `Nullable(JSON)` returns the JSON object after deletion.
+
+## Examples
+1. Path does not exist
+```sql
+SELECT JSON_REMOVE('{"a": 1, "b": 2, "c": 3}', '$.d');
+```
+```text
++------------------------------------------------+
+| JSON_REMOVE('{"a": 1, "b": 2, "c": 3}', '$.d') |
++------------------------------------------------+
+| {"a":1,"b":2,"c":3} |
++------------------------------------------------+
+```
+
+2. Remove the value pointed to by `<path>` from the JSON object
+```sql
+SELECT JSON_REMOVE('{"Name": "Jack", "Gender": "Male", "Age": 20}', '$.Age');
+```
+```text
++-----------------------------------------------------------------------+
+| JSON_REMOVE('{"Name": "Jack", "Gender": "Male", "Age": 20}', '$.Age') |
++-----------------------------------------------------------------------+
+| {"Name":"Jack","Gender":"Male"} |
++-----------------------------------------------------------------------+
+```
+
+3. Specify multiple paths to delete data from multiple locations in a JSON
object
+```sql
+SELECT JSON_REMOVE('[1, 2, 3, 4, 5]', '$[3]'), JSON_REMOVE('[1, 2, 3, 4, 5]',
'$[1]', '$[3]');
+```
+```text
++----------------------------------------+------------------------------------------------+
+| JSON_REMOVE('[1, 2, 3, 4, 5]', '$[3]') | JSON_REMOVE('[1, 2, 3, 4, 5]',
'$[1]', '$[3]') |
++----------------------------------------+------------------------------------------------+
+| [1,2,3,5] | [1,3,4]
|
++----------------------------------------+------------------------------------------------+
+```
+
+4. Larger JSON object
+```sql
+SELECT JSON_REMOVE('{"Person": {"Name": "Jack","Age": 20,"Hobbies": ["Eating",
"Sleeping", "Base Jumping"]}}', '$.Person.Age', '$.Person.Hobbies[2]');
+```
+```text
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| JSON_REMOVE('{"Person": {"Name": "Jack","Age": 20,"Hobbies": ["Eating",
"Sleeping", "Base Jumping"]}}', '$.Person.Age', '$.Person.Hobbies[2]') |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| {"Person":{"Name":"Jack","Hobbies":["Eating","Sleeping"]}}
|
++------------------------------------------------------------------------------------------------------------------------------------------------+
+```
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/json-functions/json-remove.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/json-functions/json-remove.md
new file mode 100644
index 00000000000..10cd5f527b8
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/json-functions/json-remove.md
@@ -0,0 +1,70 @@
+---
+{
+ "title": "JSON_REMOVE",
+ "language": "zh-CN"
+}
+---
+
+## 描述
+`JSON_REMOVE` 函数用于从 JSON 文档中删除数据并返回结果。
+
+## 语法
+```sql
+JSON_REMOVE (<json_object>, path[, path] ...)
+```
+
+## 参数
+- `<json_object>` JSON 类型表达式,被删除的目标。
+- `<path>` String 类型表达式,路径参数按从左到右的顺序进行求值。对一个路径进行求值所产生的 JSON 文档成为下一个路径求值的新值。
+
+## 返回值
+- `Nullable(JSON)` 返回被删除后的 JSON 对象。
+
+## 示例
+1. 路径不存在
+```sql
+SELECT JSON_REMOVE('{"a": 1, "b": 2, "c": 3}', '$.d');
+```
+```text
++------------------------------------------------+
+| JSON_REMOVE('{"a": 1, "b": 2, "c": 3}', '$.d') |
++------------------------------------------------+
+| {"a":1,"b":2,"c":3} |
++------------------------------------------------+
+```
+
+2. `<path>` 指向的值在 JSON 对象中删除
+```sql
+SELECT JSON_REMOVE('{"Name": "Jack", "Gender": "Male", "Age": 20}', '$.Age');
+```
+```text
++-----------------------------------------------------------------------+
+| JSON_REMOVE('{"Name": "Jack", "Gender": "Male", "Age": 20}', '$.Age') |
++-----------------------------------------------------------------------+
+| {"Name":"Jack","Gender":"Male"} |
++-----------------------------------------------------------------------+
+```
+
+3. 指定多个路径从 JSON 对象的多个位置删除数据
+```sql
+SELECT JSON_REMOVE('[1, 2, 3, 4, 5]', '$[3]'), JSON_REMOVE('[1, 2, 3, 4, 5]',
'$[1]', '$[3]');
+```
+```text
++----------------------------------------+------------------------------------------------+
+| JSON_REMOVE('[1, 2, 3, 4, 5]', '$[3]') | JSON_REMOVE('[1, 2, 3, 4, 5]',
'$[1]', '$[3]') |
++----------------------------------------+------------------------------------------------+
+| [1,2,3,5] | [1,3,4]
|
++----------------------------------------+------------------------------------------------+
+```
+
+4. 更大的 JSON 对象
+```sql
+SELECT JSON_REMOVE('{"Person": {"Name": "Jack","Age": 20,"Hobbies": ["Eating",
"Sleeping", "Base Jumping"]}}', '$.Person.Age', '$.Person.Hobbies[2]');
+```
+```text
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| JSON_REMOVE('{"Person": {"Name": "Jack","Age": 20,"Hobbies": ["Eating",
"Sleeping", "Base Jumping"]}}', '$.Person.Age', '$.Person.Hobbies[2]') |
++------------------------------------------------------------------------------------------------------------------------------------------------+
+| {"Person":{"Name":"Jack","Hobbies":["Eating","Sleeping"]}}
|
++------------------------------------------------------------------------------------------------------------------------------------------------+
+```
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]