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 5f17aab5c66 add doc of deduplicate_map (#3140)
5f17aab5c66 is described below

commit 5f17aab5c66f6ed2dda27330123c44cf8e457a36
Author: Jerry Hu <[email protected]>
AuthorDate: Mon Dec 8 09:07:03 2025 +0800

    add doc of deduplicate_map (#3140)
    
    https://github.com/apache/doris/pull/58403
    
    ## Versions
    
    - [x] dev
    - [ ] 4.x
    - [ ] 3.x
    - [ ] 2.1
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../map-functions/deduplicate-map.md               | 41 ++++++++++++++++++++++
 .../map-functions/deduplicate-map.md               | 41 ++++++++++++++++++++++
 sidebars.ts                                        |  1 +
 3 files changed, 83 insertions(+)

diff --git 
a/docs/sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map.md
 
b/docs/sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map.md
new file mode 100644
index 00000000000..6b51c62791b
--- /dev/null
+++ 
b/docs/sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map.md
@@ -0,0 +1,41 @@
+---
+{
+    "title": "DEDUPLICATE_MAP",
+    "language": "en"
+}
+---
+
+## Description
+
+Removes duplicate keys from a Map.
+By default, Doris deduplicates generated Maps (such as when importing data).
+However, Maps obtained in certain special scenarios may not be deduplicated, 
such as data read from external tables or Maps converted from strings.
+This function can be used to deduplicate Map types.
+
+## Syntaxntax
+
+```sql
+DEDUPLICATE_MAP(<map>)
+```
+
+## Parameters
+
+- `<map>`: The input map content.
+
+## Return Value
+
+`Map`: Returns the deduplicated Map (type matches the input parameter type).
+
+## Examples
+    ```sql
+    select m, deduplicate_map(m) from (select cast('{"a": 123, "a": 345}' as 
map<string, int>) m ) t;
+    ```
+
+    ```text
+    +--------------------+--------------------+
+    | m                  | deduplicate_map(m) |
+    +--------------------+--------------------+
+    | {"a":123, "a":345} | {"a":345}          |
+    +--------------------+--------------------+
+    ```
+> Maps converted from strings are not deduplicated.
\ No newline at end of file
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map.md
new file mode 100644
index 00000000000..3146f6a6fb1
--- /dev/null
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map.md
@@ -0,0 +1,41 @@
+---
+{
+    "title": "DEDUPLICATE_MAP",
+    "language": "zh-CN"
+}
+---
+
+## 描述
+
+去掉 Map 中的重复 key。
+默认情况下 Doris 会对生成的 Map (比如在导入数据的时候)去重。
+但是某些特殊场景得到的 Map 可能是未去重的,比如从外表读取的数据,比如从字符串转换为 Map 类型。
+可以使用该函数对 Map 类型去重。
+
+## 语法
+
+```sql
+DEDUPLICATE_MAP(<map>)
+```
+
+## 参数
+
+- `<map>` 输入的 map 内容
+
+## 返回值
+
+`Map`: 返回去重之后的 Map(类型和输入参数类型一致)。
+
+## 举例
+    ```sql
+    select m, deduplicate_map(m) from (select cast('{"a": 123, "a": 345}' as 
map<string, int>) m ) t;
+    ```
+
+    ```text
+    +--------------------+--------------------+
+    | m                  | deduplicate_map(m) |
+    +--------------------+--------------------+
+    | {"a":123, "a":345} | {"a":345}          |
+    +--------------------+--------------------+
+    ```
+> 从字符串转换而来的 Map 是未去重的。
\ No newline at end of file
diff --git a/sidebars.ts b/sidebars.ts
index 3793c89cc92..f3900051d8d 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -1591,6 +1591,7 @@ const sidebars: SidebarsConfig = {
                                     type: 'category',
                                     label: 'MAP Functions',
                                     items: [
+                                        
'sql-manual/sql-functions/scalar-functions/map-functions/deduplicate-map',
                                         
'sql-manual/sql-functions/scalar-functions/map-functions/map',
                                         
'sql-manual/sql-functions/scalar-functions/map-functions/map-contains-entry',
                                         
'sql-manual/sql-functions/scalar-functions/map-functions/map-contains-key',


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to