This is an automated email from the ASF dual-hosted git repository.

panxiaolei 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 5e1ae3c4c11 update 
array-agg/collect-list/collect-set/group-array-intersect/group-bitmap-xor/intersect-count/map-agg
 (#2801)
5e1ae3c4c11 is described below

commit 5e1ae3c4c11cfd1ca747bb6dcd125661d7e13e6f
Author: Pxl <[email protected]>
AuthorDate: Wed Aug 27 22:21:11 2025 +0800

    update 
array-agg/collect-list/collect-set/group-array-intersect/group-bitmap-xor/intersect-count/map-agg
 (#2801)
    
    ## Versions
    
    - [ ] dev
    - [ ] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [ ] Chinese
    - [ ] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../sql-functions/aggregate-functions/array-agg.md | 58 ++++++--------
 .../aggregate-functions/collect-list.md            | 56 ++++++-------
 .../aggregate-functions/collect-set.md             | 56 ++++++-------
 .../aggregate-functions/group-array-intersect.md   | 43 ++++++----
 .../aggregate-functions/group-bitmap-xor.md        | 47 +++++++----
 .../aggregate-functions/intersect-count.md         | 46 +++++------
 .../sql-functions/aggregate-functions/map-agg.md   | 86 ++++++++++----------
 .../sql-functions/aggregate-functions/array-agg.md | 59 ++++++--------
 .../aggregate-functions/collect-list.md            | 59 ++++++--------
 .../aggregate-functions/collect-set.md             | 59 ++++++--------
 .../aggregate-functions/group-array-intersect.md   | 44 +++++++----
 .../aggregate-functions/group-bitmap-xor.md        | 47 +++++++----
 .../aggregate-functions/intersect-count.md         | 51 +++++++-----
 .../sql-functions/aggregate-functions/map-agg.md   | 92 +++++++++-------------
 14 files changed, 406 insertions(+), 397 deletions(-)

diff --git a/docs/sql-manual/sql-functions/aggregate-functions/array-agg.md 
b/docs/sql-manual/sql-functions/aggregate-functions/array-agg.md
index 3e8d21336f6..b467c11f092 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/array-agg.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/array-agg.md
@@ -19,7 +19,7 @@ ARRAY_AGG(<col>)
 
 | Parameter | Description |
 | -- | -- |
-| `<col>` | An expression that determines the values to be placed into the 
array (usually column names). |
+| `<col>` | An expression that determines the values to be placed into the 
array. Supported types: Bool, TinyInt, SmallInt, Integer, BigInt, LargeInt, 
Float, Double, Decimal, Date, Datetime, IPV4, IPV6, String, Array, Map, Struct. 
|
 
 ## Return Value
 
@@ -32,27 +32,13 @@ Returns a value of ARRAY type.Special cases:
 ## Example
 
 ```sql
-select * from test_doris_array_agg;
-```
-
-```text
-+------+------+
-
-| c1   | c2   |
-
-+------+------+
-
-|    1 | a    |
-
-|    1 | b    |
-
-|    2 | c    |
-
-|    2 | NULL |
-
-|    3 | NULL |
-
-+------+------+
+-- setup
+CREATE TABLE test_doris_array_agg (
+       c1 INT,
+       c2 INT
+) DISTRIBUTED BY HASH(c1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO test_doris_array_agg VALUES (1, 10), (1, 20), (1, 30), (2, 100), 
(2, 200), (3, NULL);
 ```
 
 ```sql
@@ -60,18 +46,26 @@ select c1, array_agg(c2) from test_doris_array_agg group by 
c1;
 ```
 
 ```text
-+------+-----------------+
-
-| c1   | array_agg(`c2`) |
++------+---------------+
+| c1   | array_agg(c2) |
++------+---------------+
+|    1 | [10, 20, 30]  |
+|    2 | [100, 200]    |
+|    3 | [null]        |
++------+---------------+
+```
 
-+------+-----------------+
+```sql
+select array_agg(c2) from test_doris_array_agg where c1 is null;
+```
 
+```text
++---------------+
+| array_agg(c2) |
++---------------+
+| []            |
++---------------+
+```
 |    1 | ["a","b"]       |
 
-|    2 | [NULL,"c"]      |
-
-|    3 | [NULL]          |
-
-+------+-----------------+
-```
 
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/collect-list.md 
b/docs/sql-manual/sql-functions/aggregate-functions/collect-list.md
index 56a08e8074a..014e2daae45 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/collect-list.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/collect-list.md
@@ -23,33 +23,24 @@ COLLECT_LIST(<expr> [,<max_size>])
 
 | Parameter | Description |
 | -- | -- |
-| `<expr>` | Column or expression to aggregate |
-| `<max_size>` | Optional parameter that can be set to limit the size of the 
resulting array to max_size elements |
+| `<expr>` | An expression to determine the values to be placed into the 
array. Supported types: Bool, TinyInt, SmallInt, Integer, BigInt, LargeInt, 
Float, Double, Decimal, Date, Datetime, IPV4, IPV6, String, Array, Map, Struct. 
|
+| `<max_size>` | Optional parameter to limit the result array size to max_size 
elements. Supported type: Integer. |
 
 ## Return Value
 
-The return type is ARRAY, which contains all values. Special circumstances:
-
-- If the value is NULL, it will filter
+Returns ARRAY type, containing all non-NULL values. If there is no valid data 
in the group, returns an empty array.
 
 ## Example
 
 ```sql
-select k1,k2,k3 from collect_list_test order by k1;
-```
-
-```text
-+------+------------+-------+
-| k1   | k2         | k3    |
-+------+------------+-------+
-|    1 | 2023-01-01 | hello |
-|    2 | 2023-01-02 | NULL  |
-|    2 | 2023-01-02 | hello |
-|    3 | NULL       | world |
-|    3 | 2023-01-02 | hello |
-|    4 | 2023-01-02 | sql   |
-|    4 | 2023-01-03 | sql   |
-+------+------------+-------+
+-- setup
+CREATE TABLE collect_list_test (
+       k1 INT,
+       k2 INT,
+       k3 STRING
+) DISTRIBUTED BY HASH(k1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO collect_list_test VALUES (1, 10, 'a'), (1, 20, 'b'), (1, 30, 'c'), 
(2, 100, 'x'), (2, 200, 'y'), (3, NULL, NULL);
 ```
 
 ```sql
@@ -57,11 +48,11 @@ select collect_list(k1),collect_list(k1,3) from 
collect_list_test;
 ```
 
 ```text
-+-------------------------+--------------------------+
-| collect_list(`k1`)      | collect_list(`k1`,3)     |
-+-------------------------+--------------------------+
-| [1,2,2,3,3,4,4]         | [1,2,2]                  |
-+-------------------------+--------------------------+
++--------------------+--------------------+
+| collect_list(k1)   | collect_list(k1,3) |
++--------------------+--------------------+
+| [1, 1, 1, 2, 2, 3] | [1, 1, 1]          |
++--------------------+--------------------+
 ```
 
 ```sql
@@ -69,12 +60,11 @@ select k1,collect_list(k2),collect_list(k3,1) from 
collect_list_test group by k1
 ```
 
 ```text
-+------+-------------------------+--------------------------+
-| k1   | collect_list(`k2`)      | collect_list(`k3`,1)     |
-+------+-------------------------+--------------------------+
-|    1 | [2023-01-01]            | [hello]                  |
-|    2 | [2023-01-02,2023-01-02] | [hello]                  |
-|    3 | [2023-01-02]            | [world]                  |
-|    4 | [2023-01-02,2023-01-03] | [sql]                    |
-+------+-------------------------+--------------------------+
++------+------------------+--------------------+
+| k1   | collect_list(k2) | collect_list(k3,1) |
++------+------------------+--------------------+
+|    1 | [10, 20, 30]     | ["a"]              |
+|    2 | [100, 200]       | ["x"]              |
+|    3 | []               | []                 |
++------+------------------+--------------------+
 ```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/collect-set.md 
b/docs/sql-manual/sql-functions/aggregate-functions/collect-set.md
index 6540ff185c9..8ba70db4a13 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/collect-set.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/collect-set.md
@@ -23,33 +23,24 @@ COLLECT_SET(<expr> [,<max_size>])
 
 | Parameter | Description |
 | -- | -- |
-| `<expr>` | Column or expression to aggregate |
-| `<max_size>` | Optional parameter that can be set to limit the size of the 
resulting array to max_size elements |
+| `<expr>` | An expression to determine the values to be placed into the 
array. Supported types: Bool, TinyInt, SmallInt, Integer, BigInt, LargeInt, 
Float, Double, Decimal, Date, Datetime, IPV4, IPV6, String, Array, Map, Struct. 
|
+| `<max_size>` | Optional parameter to limit the result array size to max_size 
elements. Supported type: Integer. |
 
 ## Return Value
 
-The return type is ARRAY. This array contains all values after deduplication. 
Special case:
-
-- If the value is NULL, it will filter
+Returns ARRAY type, containing all non-NULL values after deduplication. If 
there is no valid data in the group, returns an empty array.
 
 ## Example
 
 ```sql
-select k1,k2,k3 from collect_set_test order by k1;
-```
-
-```text
-+------+------------+-------+
-| k1   | k2         | k3    |
-+------+------------+-------+
-|    1 | 2023-01-01 | hello |
-|    2 | 2023-01-01 | NULL  |
-|    2 | 2023-01-02 | hello |
-|    3 | NULL       | world |
-|    3 | 2023-01-02 | hello |
-|    4 | 2023-01-02 | doris |
-|    4 | 2023-01-03 | sql   |
-+------+------------+-------+
+-- setup
+CREATE TABLE collect_set_test (
+       k1 INT,
+       k2 INT,
+       k3 STRING
+) DISTRIBUTED BY HASH(k1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO collect_set_test VALUES (1, 10, 'a'), (1, 20, 'b'), (1, 10, 'a'), 
(2, 100, 'x'), (2, 200, 'y'), (3, NULL, NULL);
 ```
 
 ```sql
@@ -57,11 +48,11 @@ select collect_set(k1),collect_set(k1,2) from 
collect_set_test;
 ```
 
 ```text
-+-------------------------+--------------------------+
-| collect_set(`k1`)       | collect_set(`k1`,2)      |
-+-------------------------+--------------------------+
-| [4,3,2,1]               | [1,2]                    |
-+----------------------------------------------------+
++-----------------+-------------------+
+| collect_set(k1) | collect_set(k1,2) |
++-----------------+-------------------+
+| [2, 1, 3]       | [2, 1]            |
++-----------------+-------------------+
 ```
 
 ```sql
@@ -69,12 +60,11 @@ select k1,collect_set(k2),collect_set(k3,1) from 
collect_set_test group by k1 or
 ```
 
 ```text
-+------+-------------------------+--------------------------+
-| k1   | collect_set(`k2`)       | collect_set(`k3`,1)      |
-+------+-------------------------+--------------------------+
-|    1 | [2023-01-01]            | [hello]                  |
-|    2 | [2023-01-01,2023-01-02] | [hello]                  |
-|    3 | [2023-01-02]            | [world]                  |
-|    4 | [2023-01-02,2023-01-03] | [sql]                    |
-+------+-------------------------+--------------------------+
++------+-----------------+-------------------+
+| k1   | collect_set(k2) | collect_set(k3,1) |
++------+-----------------+-------------------+
+|    1 | [20, 10]        | ["a"]             |
+|    2 | [200, 100]      | ["x"]             |
+|    3 | []              | []                |
++------+-----------------+-------------------+
 ```
diff --git 
a/docs/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md 
b/docs/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
index 7db1cabeb73..6818614065f 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
@@ -19,37 +19,48 @@ GROUP_ARRAY_INTERSECT(<expr>)
 
 | Parameter | Description |
 | -- | -- |
-| `<expr>` | Array columns or array values that require intersection |
+| `<expr>` | An expression to calculate intersection, supported type: Array. |
 
 ## Return Value
 
-Returns an array containing the intersection results
+Returns an array containing the intersection results. If there is no valid 
data in the group, returns an empty array.
 
 ## Example
 
 ```sql
-select c_array_string from group_array_intersect_test where id in (18, 20);
+-- setup
+CREATE TABLE group_array_intersect_test (
+    id INT,
+    c_array_string ARRAY<STRING>
+) DISTRIBUTED BY HASH(id) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO group_array_intersect_test VALUES
+    (1, ['a', 'b', 'c', 'd', 'e']),
+    (2, ['a', 'b']),
+    (3, ['a', null]);
+```
+
+```sql
+select group_array_intersect(c_array_string) from group_array_intersect_test;
 ```
 
 ```text
-+------+---------------------------+
-| id   | col                       |
-+------+---------------------------+
-|    1 | ["a", "b", "c", "d", "e"] |
-|    2 | ["a", "b"]                |
-|    3 | ["a", null]               |
-+------+---------------------------+
++---------------------------------------+
+| group_array_intersect(c_array_string) |
++---------------------------------------+
+| ["a"]                                 |
++---------------------------------------+
 ```
 
 ```sql
-select group_array_intersect(col) from group_array_intersect_test;
+select group_array_intersect(c_array_string) from group_array_intersect_test 
where id is null;
 ```
 
 ```text
-+----------------------------+
-| group_array_intersect(col) |
-+----------------------------+
-| ["a"]                      |
-+----------------------------+
++---------------------------------------+
+| group_array_intersect(c_array_string) |
++---------------------------------------+
+| []                                    |
++---------------------------------------+
 ```
 
diff --git 
a/docs/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md 
b/docs/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
index 12c66f8be03..79211ac1b2b 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
@@ -23,32 +23,49 @@ GROUP_BITMAP_XOR(<expr>)
 
 ## Return Value
 
-The data type of the return value is BITMAP.
+The data type of the return value is BITMAP. If there is no valid data in the 
group, returns NULL.
 
 ## Example
 
 ```sql
- select page, bitmap_to_string(user_id) from pv_bitmap;
+-- setup
+CREATE TABLE pv_bitmap (
+       page varchar(10),
+       user_id BITMAP
+) DISTRIBUTED BY HASH(page) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO pv_bitmap VALUES
+       ('m', to_bitmap(4)),
+       ('m', to_bitmap(7)),
+       ('m', to_bitmap(8)),
+       ('m', to_bitmap(1)),
+       ('m', to_bitmap(3)),
+       ('m', to_bitmap(6)),
+       ('m', to_bitmap(15)),
+       ('m', to_bitmap(4)),
+       ('m', to_bitmap(7));
+```
+
+```sql
+select page, bitmap_to_string(group_bitmap_xor(user_id)) from pv_bitmap group 
by page;
 ```
 
 ```text
-+------+-----------------------------+
-| page | bitmap_to_string(`user_id`) |
-+------+-----------------------------+
-| m    | 4,7,8                       |
-| m    | 1,3,6,15                    |
-| m    | 4,7                         |
-+------+-----------------------------+
++------+---------------------------------------------+
+| page | bitmap_to_string(group_bitmap_xor(user_id)) |
++------+---------------------------------------------+
+| m    | 1,3,6,8,15                                  |
++------+---------------------------------------------+
 ```
 
 ```sql
-select page, bitmap_to_string(group_bitmap_xor(user_id)) from pv_bitmap group 
by page;
+select bitmap_to_string(group_bitmap_xor(user_id)) from pv_bitmap where page 
is null;
 ```
 
 ```text
-+------+-----------------------------------------------+
-| page | bitmap_to_string(group_bitmap_xor(`user_id`)) |
-+------+-----------------------------------------------+
-| m    | 1,3,6,8,15                                    |
-+------+-----------------------------------------------+
++---------------------------------------------+
+| bitmap_to_string(group_bitmap_xor(user_id)) |
++---------------------------------------------+
+| NULL                                        |
++---------------------------------------------+
 ```
diff --git 
a/docs/sql-manual/sql-functions/aggregate-functions/intersect-count.md 
b/docs/sql-manual/sql-functions/aggregate-functions/intersect-count.md
index f6ae92aa78e..96365e1b4ae 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/intersect-count.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/intersect-count.md
@@ -22,40 +22,42 @@ INTERSECT_COUNT(<bitmap_column>, <column_to_filter>, 
<filter_values> [, ...])
 
 | Parameter         | Description                                      |
 |------------------|--------------------------------------------------|
-| `<bitmap_column>`  | The input bitmap parameter column               |
-| `<column_to_filter>` | The dimension column used for filtering       |
-| `<filter_values>`  | The different values used to filter the dimension 
column |
+| `<bitmap_column>`  | The input bitmap parameter column. Supported types: 
Bitmap. |
+| `<column_to_filter>` | The dimension column used for filtering. Supported 
types: TinyInt, SmallInt, Integer, BigInt, LargeInt. |
+| `<filter_values>`  | The different values used to filter the dimension 
column. Supported types: TinyInt, SmallInt, Integer, BigInt, LargeInt. |
 
 
 ## Return Value  
 
-Return the number of elements in the intersection of the given bitmaps.
+Returns the number of elements in the intersection of the given bitmaps.
 
 ## Example
 
 ```sql
-select dt,bitmap_to_string(user_id) from pv_bitmap;
-```
-
-```text
-+------+---------------------------+
-| dt   | bitmap_to_string(user_id) |
-+------+---------------------------+
-|    1 | 1,2                       |
-|    2 | 2,3                       |
-|    4 | 1,2,3,4,5                 |
-|    3 | 1,2,3                     |
-+------+---------------------------+
+-- setup
+CREATE TABLE pv_bitmap (
+       dt INT,
+       user_id BITMAP,
+       city STRING
+) DISTRIBUTED BY HASH(dt) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO pv_bitmap VALUES
+       (20250801, to_bitmap(1), 'beijing'),
+       (20250801, to_bitmap(2), 'beijing'),
+       (20250801, to_bitmap(3), 'shanghai'),
+       (20250802, to_bitmap(3), 'beijing'),
+       (20250802, to_bitmap(4), 'shanghai'),
+       (20250802, to_bitmap(5), 'shenzhen');
 ```
 
 ```sql
-select intersect_count(user_id,dt,3,4) from pv_bitmap;
+select intersect_count(user_id,dt,20250801) from pv_bitmap;
 ```
 
 ```text
-+------------------------------------+
-| intersect_count(user_id, dt, 3, 4) |
-+------------------------------------+
-|                                  3 |
-+------------------------------------+
++--------------------------------------+
+| intersect_count(user_id,dt,20250801) |
++--------------------------------------+
+|                                    3 |
++--------------------------------------+
 ```
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/map-agg.md 
b/docs/sql-manual/sql-functions/aggregate-functions/map-agg.md
index 28f746070f1..25e55b7adab 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/map-agg.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/map-agg.md
@@ -15,70 +15,68 @@ The MAP_AGG function is used to form a mapping structure 
based on key-value pair
 
 ## Parameters
 
-| Parameters | Description |
+| Parameter | Description |
 | -- | -- |
-| `<expr1>` | The expression used to specify the key. |
-| `<expr2>` | The expression used to specify the corresponding value. |
+| `<expr1>` | The expression used as the key. Supported types: Bool, TinyInt, 
SmallInt, Integer, BigInt, LargeInt, Float, Double, Decimal, Date, Datetime, 
String. |
+| `<expr2>` | The expression used as the value. Supported types: Bool, 
TinyInt, SmallInt, Integer, BigInt, LargeInt, Float, Double, Decimal, Date, 
Datetime, String. |
 
 ## Return Value
 
-Returns a value of the MAP type.
+Returns a value of the Map type. If there is no valid data in the group, 
returns an empty Map.
 
 ## Example
 
 ```sql
-select `n_nationkey`, `n_name`, `n_regionkey` from `nation`;
+-- setup
+CREATE TABLE nation (
+    n_nationkey INT,
+    n_name STRING,
+    n_regionkey INT
+) DISTRIBUTED BY HASH(n_nationkey) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO nation VALUES
+    (0, 'ALGERIA', 0),
+    (1, 'ARGENTINA', 1),
+    (2, 'BRAZIL', 1),
+    (3, 'CANADA', 1);
+```
+
+```sql
+select `n_regionkey`, map_agg(`n_nationkey`, `n_name`) from `nation` group by 
`n_regionkey`;
 ```
 
 ```text
-+-------------+----------------+-------------+
-| n_nationkey | n_name         | n_regionkey |
-+-------------+----------------+-------------+
-|           0 | ALGERIA        |           0 |
-|           1 | ARGENTINA      |           1 |
-|           2 | BRAZIL         |           1 |
-|           3 | CANADA         |           1 |
-|           4 | EGYPT          |           4 |
-|           5 | ETHIOPIA       |           0 |
-|           6 | FRANCE         |           3 |
-|           7 | GERMANY        |           3 |
-|           8 | INDIA          |           2 |
-|           9 | INDONESIA      |           2 |
-|          10 | IRAN           |           4 |
-|          11 | IRAQ           |           4 |
-|          12 | JAPAN          |           2 |
-|          13 | JORDAN         |           4 |
-|          14 | KENYA          |           0 |
-|          15 | MOROCCO        |           0 |
-|          16 | MOZAMBIQUE     |           0 |
-|          17 | PERU           |           1 |
-|          18 | CHINA          |           2 |
-|          19 | ROMANIA        |           3 |
-|          20 | SAUDI ARABIA   |           4 |
-|          21 | VIETNAM        |           2 |
-|          22 | RUSSIA         |           3 |
-|          23 | UNITED KINGDOM |           3 |
-|          24 | UNITED STATES  |           1 |
-+-------------+----------------+-------------+
++-------------+-----------------------------------------+
+| n_regionkey | map_agg(`n_nationkey`, `n_name`)        |
++-------------+-----------------------------------------+
+|           0 | {0:"ALGERIA"}                           |
+|           1 | {1:"ARGENTINA", 2:"BRAZIL", 3:"CANADA"} |
++-------------+-----------------------------------------+
 ```
 
 ```sql
-select `n_regionkey`, map_agg(`n_nationkey`, `n_name`) from `nation` group by 
`n_regionkey`;
+select map_agg(`n_name`, `n_nationkey` % 5) from `nation`;
 ```
 
 ```text
-+-------------+---------------------------------------------------------------------------+
-| n_regionkey | map_agg(`n_nationkey`, `n_name`)                               
           |
-+-------------+---------------------------------------------------------------------------+
-|           1 | {1:"ARGENTINA", 2:"BRAZIL", 3:"CANADA", 17:"PERU", 24:"UNITED 
STATES"}    |
-|           0 | {0:"ALGERIA", 5:"ETHIOPIA", 14:"KENYA", 15:"MOROCCO", 
16:"MOZAMBIQUE"}    |
-|           3 | {6:"FRANCE", 7:"GERMANY", 19:"ROMANIA", 22:"RUSSIA", 
23:"UNITED KINGDOM"} |
-|           4 | {4:"EGYPT", 10:"IRAN", 11:"IRAQ", 13:"JORDAN", 20:"SAUDI 
ARABIA"}         |
-|           2 | {8:"INDIA", 9:"INDONESIA", 12:"JAPAN", 18:"CHINA", 
21:"VIETNAM"}          |
-+-------------+---------------------------------------------------------------------------+
++------------------------------------------------------+
+| map_agg(`n_name`, `n_nationkey` % 5)                 |
++------------------------------------------------------+
+| {"ALGERIA":0, "ARGENTINA":1, "BRAZIL":2, "CANADA":3} |
++------------------------------------------------------+
 ```
 
 ```sql
+select map_agg(`n_name`, `n_nationkey` % 5) from `nation` where n_nationkey is 
null;
+```
+
+```text
++--------------------------------------+
+| map_agg(`n_name`, `n_nationkey` % 5) |
++--------------------------------------+
+| {}                                   |
++--------------------------------------+
+```
 select n_regionkey, map_agg(`n_name`, `n_nationkey` % 5) from `nation` group 
by `n_regionkey`;
 ```
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/array-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/array-agg.md
index 1848054b583..a4c4bb2abbd 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/array-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/array-agg.md
@@ -19,7 +19,7 @@ ARRAY_AGG(<col>)
 
 | 参数 | 说明 |
 | -- | -- |
-| `<col>` | 确定要放入数组的值的表达式(通常是列名) |
+| `<col>` | 确定要放入数组的值的表达式,支持类型为 
Bool,TinyInt,SmallInt,Integer,BigInt,LargeInt,Float,Double,Decimal,Date,Datetime,IPV4,IPV6,String,Array,Map,Struct。|
 
 ## 返回值
 
@@ -31,27 +31,13 @@ ARRAY_AGG(<col>)
 ## 举例
 
 ```sql
-select * from test_doris_array_agg;
-```
-
-```text
-+------+------+
-
-| c1   | c2   |
-
-+------+------+
-
-|    1 | a    |
-
-|    1 | b    |
-
-|    2 | c    |
-
-|    2 | NULL |
-
-|    3 | NULL |
-
-+------+------+
+-- setup
+CREATE TABLE test_doris_array_agg (
+       c1 INT,
+       c2 INT
+) DISTRIBUTED BY HASH(c1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO test_doris_array_agg VALUES (1, 10), (1, 20), (1, 30), (2, 100), 
(2, 200), (3, NULL);
 ```
 
 ```sql
@@ -59,17 +45,24 @@ select c1, array_agg(c2) from test_doris_array_agg group by 
c1;
 ```
 
 ```text
-+------+-----------------+
-
-| c1   | array_agg(`c2`) |
-
-+------+-----------------+
-
-|    1 | ["a","b"]       |
-
-|    2 | [NULL,"c"]      |
++------+---------------+
+| c1   | array_agg(c2) |
++------+---------------+
+|    1 | [10, 20, 30]  |
+|    2 | [100, 200]    |
+|    3 | [null]        |
++------+---------------+
+```
 
-|    3 | [NULL]          |
+```sql
+select array_agg(c2) from test_doris_array_agg where c1 is null;
+```
 
-+------+-----------------+
+```text
++---------------+
+| array_agg(c2) |
++---------------+
+| []            |
++---------------+
 ```
+
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-list.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-list.md
index ec8e4db45e9..3d5682f0528 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-list.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-list.md
@@ -7,7 +7,7 @@
 
 ## 描述
 
-聚合函数,用于将某一列的所有值聚集成一个数组
+将表达式的所有非 NULL 值聚集成一个数组。
 
 ## 别名
 
@@ -23,33 +23,25 @@ COLLECT_LIST(<expr> [,<max_size>])
 
 | 参数 | 说明 |
 | -- | -- |
-| `<expr>` | 要聚合的列或表达式 |
-| `<max_size>` | 可选参数,通过设置该参数能够将结果数组的大小限制为 max_size 个元素 |
+| `<expr>` | 确定要放入数组的值的表达式,支持类型为 
Bool,TinyInt,SmallInt,Integer,BigInt,LargeInt,Float,Double,Decimal,Date,Datetime,IPV4,IPV6,String,Array,Map,Struct。|
+| `<max_size>` | 可选参数,通过设置该参数能够将结果数组的大小限制为 max_size 个元素,支持类型为 Integer。 |
 
 ## 返回值
 
-返回类型是 ARRAY,该数组包含所有值。特殊情况:
-
-- 如果值为 NULL,则会过滤
+返回类型是 ARRAY,该数组包含所有非 NULL 值。
+如果组内没有合法数据,则返回空数组。
 
 ## 举例
 
 ```sql
-select k1,k2,k3 from collect_list_test order by k1;
-```
-
-```text
-+------+------------+-------+
-| k1   | k2         | k3    |
-+------+------------+-------+
-|    1 | 2023-01-01 | hello |
-|    2 | 2023-01-02 | NULL  |
-|    2 | 2023-01-02 | hello |
-|    3 | NULL       | world |
-|    3 | 2023-01-02 | hello |
-|    4 | 2023-01-02 | sql   |
-|    4 | 2023-01-03 | sql   |
-+------+------------+-------+
+-- setup
+CREATE TABLE collect_list_test (
+       k1 INT,
+       k2 INT,
+       k3 STRING
+) DISTRIBUTED BY HASH(k1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO collect_list_test VALUES (1, 10, 'a'), (1, 20, 'b'), (1, 30, 'c'), 
(2, 100, 'x'), (2, 200, 'y'), (3, NULL, NULL);
 ```
 
 ```sql
@@ -57,11 +49,11 @@ select collect_list(k1),collect_list(k1,3) from 
collect_list_test;
 ```
 
 ```text
-+-------------------------+--------------------------+
-| collect_list(`k1`)      | collect_list(`k1`,3)     |
-+-------------------------+--------------------------+
-| [1,2,2,3,3,4,4]         | [1,2,2]                  |
-+-------------------------+--------------------------+
++--------------------+--------------------+
+| collect_list(k1)   | collect_list(k1,3) |
++--------------------+--------------------+
+| [1, 1, 1, 2, 2, 3] | [1, 1, 1]          |
++--------------------+--------------------+
 ```
 
 ```sql
@@ -69,13 +61,12 @@ select k1,collect_list(k2),collect_list(k3,1) from 
collect_list_test group by k1
 ```
 
 ```text
-+------+-------------------------+--------------------------+
-| k1   | collect_list(`k2`)      | collect_list(`k3`,1)     |
-+------+-------------------------+--------------------------+
-|    1 | [2023-01-01]            | [hello]                  |
-|    2 | [2023-01-02,2023-01-02] | [hello]                  |
-|    3 | [2023-01-02]            | [world]                  |
-|    4 | [2023-01-02,2023-01-03] | [sql]                    |
-+------+-------------------------+--------------------------+
++------+------------------+--------------------+
+| k1   | collect_list(k2) | collect_list(k3,1) |
++------+------------------+--------------------+
+|    1 | [10, 20, 30]     | ["a"]              |
+|    2 | [100, 200]       | ["x"]              |
+|    3 | []               | []                 |
++------+------------------+--------------------+
 ```
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-set.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-set.md
index fe3c37d4209..4894e9b01fb 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-set.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/collect-set.md
@@ -7,7 +7,7 @@
 
 ## 描述
 
-聚合函数,聚合指定列的所有唯一值,去除重复的元素,并返回一个集合类型的结果。
+将表达式的所有非 NULL 值去重后聚集成一个数组。
 
 ## 别名
 
@@ -23,33 +23,25 @@ COLLECT_SET(<expr> [,<max_size>])
 
 | 参数 | 说明 |
 | -- | -- |
-| `<expr>` | 要聚合的列或表达式 |
-| `<max_size>` | 可选参数,通过设置该参数能够将结果数组的大小限制为 max_size 个元素 |
+| `<expr>` | 确定要放入数组的值的表达式,支持类型为 
Bool,TinyInt,SmallInt,Integer,BigInt,LargeInt,Float,Double,Decimal,Date,Datetime,IPV4,IPV6,String,Array,Map,Struct。
 |
+| `<max_size>` | 可选参数,通过设置该参数能够将结果数组的大小限制为 max_size 个元素,支持类型为 Integer。 |
 
 ## 返回值
 
-返回类型是 ARRAY,该数组包含去重后的所有值,特殊情况:
-
-- 如果值为 NULL,则会过滤
+返回类型是 ARRAY,该数组包含所有非 NULL 值。
+如果组内没有合法数据,则返回空数组。
 
 ## 举例
 
 ```sql
-select k1,k2,k3 from collect_set_test order by k1;
-```
-
-```text
-+------+------------+-------+
-| k1   | k2         | k3    |
-+------+------------+-------+
-|    1 | 2023-01-01 | hello |
-|    2 | 2023-01-01 | NULL  |
-|    2 | 2023-01-02 | hello |
-|    3 | NULL       | world |
-|    3 | 2023-01-02 | hello |
-|    4 | 2023-01-02 | doris |
-|    4 | 2023-01-03 | sql   |
-+------+------------+-------+
+-- setup
+CREATE TABLE collect_set_test (
+       k1 INT,
+       k2 INT,
+       k3 STRING
+) DISTRIBUTED BY HASH(k1) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO collect_set_test VALUES (1, 10, 'a'), (1, 20, 'b'), (1, 10, 'a'), 
(2, 100, 'x'), (2, 200, 'y'), (3, NULL, NULL);
 ```
 
 ```sql
@@ -57,11 +49,11 @@ select collect_set(k1),collect_set(k1,2) from 
collect_set_test;
 ```
 
 ```text
-+-------------------------+--------------------------+
-| collect_set(`k1`)       | collect_set(`k1`,2)      |
-+-------------------------+--------------------------+
-| [4,3,2,1]               | [1,2]                    |
-+----------------------------------------------------+
++-----------------+-------------------+
+| collect_set(k1) | collect_set(k1,2) |
++-----------------+-------------------+
+| [2, 1, 3]       | [2, 1]            |
++-----------------+-------------------+
 ```
 
 ```sql
@@ -69,12 +61,11 @@ select k1,collect_set(k2),collect_set(k3,1) from 
collect_set_test group by k1 or
 ```
 
 ```text
-+------+-------------------------+--------------------------+
-| k1   | collect_set(`k2`)       | collect_set(`k3`,1)      |
-+------+-------------------------+--------------------------+
-|    1 | [2023-01-01]            | [hello]                  |
-|    2 | [2023-01-01,2023-01-02] | [hello]                  |
-|    3 | [2023-01-02]            | [world]                  |
-|    4 | [2023-01-02,2023-01-03] | [sql]                    |
-+------+-------------------------+--------------------------+
++------+-----------------+-------------------+
+| k1   | collect_set(k2) | collect_set(k3,1) |
++------+-----------------+-------------------+
+|    1 | [20, 10]        | ["a"]             |
+|    2 | [200, 100]      | ["x"]             |
+|    3 | []              | []                |
++------+-----------------+-------------------+
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
index d3648a3bdd7..78c7d90cab0 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-array-intersect.md
@@ -19,36 +19,48 @@ GROUP_ARRAY_INTERSECT(<expr>)
 
 | 参数 | 说明 |
 | -- | -- |
-| `<expr>` | 需要求交集的数组列或数组值 |
+| `<expr>` | 需要求交集的表达式,支持类型为 Array。 |
 
 ## 返回值
 
-返回一个包含交集结果的数组
+返回一个包含交集结果的数组。
+如果组内没有合法数据,则返回空数组。
 
 ## 举例
 
 ```sql
-select c_array_string from group_array_intersect_test where id in (18, 20);
+-- setup
+CREATE TABLE group_array_intersect_test (
+       id INT,
+       c_array_string ARRAY<STRING>
+) DISTRIBUTED BY HASH(id) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO group_array_intersect_test VALUES
+       (1, ['a', 'b', 'c', 'd', 'e']),
+       (2, ['a', 'b']),
+       (3, ['a', null]);
+```
+
+```sql
+select group_array_intersect(c_array_string) from group_array_intersect_test;
 ```
 
 ```text
-+------+---------------------------+
-| id   | col                       |
-+------+---------------------------+
-|    1 | ["a", "b", "c", "d", "e"] |
-|    2 | ["a", "b"]                |
-|    3 | ["a", null]               |
-+------+---------------------------+
++---------------------------------------+
+| group_array_intersect(c_array_string) |
++---------------------------------------+
+| ["a"]                                 |
++---------------------------------------+
 ```
 
 ```sql
-select group_array_intersect(col) from group_array_intersect_test;
+select group_array_intersect(c_array_string) from group_array_intersect_test 
where id is null;
 ```
 
 ```text
-+----------------------------+
-| group_array_intersect(col) |
-+----------------------------+
-| ["a"]                      |
-+----------------------------+
++---------------------------------------+
+| group_array_intersect(c_array_string) |
++---------------------------------------+
+| []                                    |
++---------------------------------------+
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
index 199db03c3cd..7e5e60bcd4a 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/group-bitmap-xor.md
@@ -24,31 +24,50 @@ GROUP_BITMAP_XOR(<expr>)
 ## 返回值
 
 返回值的数据类型为 BITMAP。
+当组内没有合法数据时,返回 NULL 。
 
 ## 举例
 
 ```sql
- select page, bitmap_to_string(user_id) from pv_bitmap;
+-- setup
+CREATE TABLE pv_bitmap (
+       page varchar(10),
+       user_id BITMAP
+) DISTRIBUTED BY HASH(page) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO pv_bitmap VALUES
+       ('m', to_bitmap(4)),
+       ('m', to_bitmap(7)),
+       ('m', to_bitmap(8)),
+       ('m', to_bitmap(1)),
+       ('m', to_bitmap(3)),
+       ('m', to_bitmap(6)),
+       ('m', to_bitmap(15)),
+       ('m', to_bitmap(4)),
+       ('m', to_bitmap(7));
+```
+
+```sql
+select page, bitmap_to_string(group_bitmap_xor(user_id)) from pv_bitmap group 
by page;
 ```
 
 ```text
-+------+-----------------------------+
-| page | bitmap_to_string(`user_id`) |
-+------+-----------------------------+
-| m    | 4,7,8                       |
-| m    | 1,3,6,15                    |
-| m    | 4,7                         |
-+------+-----------------------------+
++------+---------------------------------------------+
+| page | bitmap_to_string(group_bitmap_xor(user_id)) |
++------+---------------------------------------------+
+| m    | 1,3,6,8,15                                  |
++------+---------------------------------------------+
 ```
 
+
 ```sql
-select page, bitmap_to_string(group_bitmap_xor(user_id)) from pv_bitmap group 
by page;
+select bitmap_to_string(group_bitmap_xor(user_id)) from pv_bitmap where page 
is null;
 ```
 
 ```text
-+------+-----------------------------------------------+
-| page | bitmap_to_string(group_bitmap_xor(`user_id`)) |
-+------+-----------------------------------------------+
-| m    | 1,3,6,8,15                                    |
-+------+-----------------------------------------------+
++---------------------------------------------+
+| bitmap_to_string(group_bitmap_xor(user_id)) |
++---------------------------------------------+
+| NULL                                        |
++---------------------------------------------+
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/intersect-count.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/intersect-count.md
index 30640805e1c..c74351ff751 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/intersect-count.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/intersect-count.md
@@ -7,9 +7,10 @@
 
 ## 描述
 
-聚合函数,求 bitmap 交集大小的函数,不要求数据分布正交
+聚合函数,求 bitmap 交集大小的函数。
 第一个参数是 Bitmap 列,第二个参数是用来过滤的维度列,第三个参数是变长参数,含义是过滤维度列的不同取值。
 计算 bitmap_column 中符合 column_to_filter 在 filter_values 之内的元素的交集数量,即 bitmap 交集计数。
+对于 filter_values 相同的数据,取它们 bitmap 的并集,最终对每个 filter_values 的并集 bitmap 求交集。
 
 ## 语法
 
@@ -22,8 +23,8 @@ INTERSECT_COUNT(<bitmap_column>, <column_to_filter>, 
<filter_values> [, ...])
 | 参数 | 说明 |
 | -- | -- |
 | `<bitmap_column>` | 输入的 bitmap 参数列 |
-| `<column_to_filter>` | 是用来过滤的维度列 |
-| `<filter_values>` | 是过滤维度列的不同取值 |
+| `<column_to_filter>` | 是用来过滤的维度列,支持类型为 
TinyInt,SmallInt,Integer,BigInt,LargeInt。 |
+| `<filter_values>` | 是过滤维度列的不同取值,TinyInt,SmallInt,Integer,BigInt,LargeInt。 |
 
 ## 返回值
 
@@ -32,28 +33,42 @@ INTERSECT_COUNT(<bitmap_column>, <column_to_filter>, 
<filter_values> [, ...])
 ## 举例
 
 ```sql
-select dt,bitmap_to_string(user_id) from pv_bitmap;
+-- setup
+CREATE TABLE pv_bitmap (
+       dt INT,
+       user_id BITMAP,
+       city STRING
+) DISTRIBUTED BY HASH(dt) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO pv_bitmap VALUES
+       (20250801, to_bitmap(1), 'beijing'),
+       (20250801, to_bitmap(2), 'beijing'),
+       (20250801, to_bitmap(3), 'shanghai'),
+       (20250802, to_bitmap(3), 'beijing'),
+       (20250802, to_bitmap(4), 'shanghai'),
+       (20250802, to_bitmap(5), 'shenzhen');
+```
+
+```sql
+select intersect_count(user_id,dt,20250801) from pv_bitmap;
 ```
 
 ```text
-+------+---------------------------+
-| dt   | bitmap_to_string(user_id) |
-+------+---------------------------+
-|    1 | 1,2                       |
-|    2 | 2,3                       |
-|    4 | 1,2,3,4,5                 |
-|    3 | 1,2,3                     |
-+------+---------------------------+
++--------------------------------------+
+| intersect_count(user_id,dt,20250801) |
++--------------------------------------+
+|                                    3 |
++--------------------------------------+
 ```
 
 ```sql
-select intersect_count(user_id,dt,3,4) from pv_bitmap;
+select intersect_count(user_id,dt,20250801,20250802) from pv_bitmap;
 ```
 
 ```text
-+------------------------------------+
-| intersect_count(user_id, dt, 3, 4) |
-+------------------------------------+
-|                                  3 |
-+------------------------------------+
++-----------------------------------------------+
+| intersect_count(user_id,dt,20250801,20250802) |
++-----------------------------------------------+
+|                                             1 |
++-----------------------------------------------+
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/map-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/map-agg.md
index fa4907adf49..67b95e401e1 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/map-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/map-agg.md
@@ -17,79 +17,65 @@ MAP_AGG 函数用于根据多行数据中的键值对形成一个映射结构。
 
 | 参数 | 说明 |
 | -- | -- |
-| `<expr1>` | 用于指定作为键的表达式。 |
-| `<expr2>` | 用于指定作为对应的值的表达式。 |
+| `<expr1>` | 用于指定作为键的表达式, 
支持类型为Bool,TinyInt,SmallInt,Integer,BigInt,LargeInt,Float,Double,Decimal,Date,Datetime,String。|
+| `<expr2>` | 用于指定作为对应的值的表达式, 
支持类型为Bool,TinyInt,SmallInt,Integer,BigInt,LargeInt,Float,Double,Decimal,Date,Datetime,String。
 |
 
 ## 返回值
 
-返回映射后的 MAP 类型的值。
+返回映射后的 Map 类型的值。
+如果组内不存在合法数据,则返回一个空 Map 。
 
 ## 举例
 
 ```sql
-select `n_nationkey`, `n_name`, `n_regionkey` from `nation`;
+-- setup
+CREATE TABLE nation (
+    n_nationkey INT,
+    n_name STRING,
+    n_regionkey INT
+) DISTRIBUTED BY HASH(n_nationkey) BUCKETS 1
+PROPERTIES ("replication_num" = "1");
+INSERT INTO nation VALUES
+    (0, 'ALGERIA', 0),
+    (1, 'ARGENTINA', 1),
+    (2, 'BRAZIL', 1),
+    (3, 'CANADA', 1);
+```
+
+```sql
+select `n_regionkey`, map_agg(`n_nationkey`, `n_name`) from `nation` group by 
`n_regionkey`;
 ```
 
 ```text
-+-------------+----------------+-------------+
-| n_nationkey | n_name         | n_regionkey |
-+-------------+----------------+-------------+
-|           0 | ALGERIA        |           0 |
-|           1 | ARGENTINA      |           1 |
-|           2 | BRAZIL         |           1 |
-|           3 | CANADA         |           1 |
-|           4 | EGYPT          |           4 |
-|           5 | ETHIOPIA       |           0 |
-|           6 | FRANCE         |           3 |
-|           7 | GERMANY        |           3 |
-|           8 | INDIA          |           2 |
-|           9 | INDONESIA      |           2 |
-|          10 | IRAN           |           4 |
-|          11 | IRAQ           |           4 |
-|          12 | JAPAN          |           2 |
-|          13 | JORDAN         |           4 |
-|          14 | KENYA          |           0 |
-|          15 | MOROCCO        |           0 |
-|          16 | MOZAMBIQUE     |           0 |
-|          17 | PERU           |           1 |
-|          18 | CHINA          |           2 |
-|          19 | ROMANIA        |           3 |
-|          20 | SAUDI ARABIA   |           4 |
-|          21 | VIETNAM        |           2 |
-|          22 | RUSSIA         |           3 |
-|          23 | UNITED KINGDOM |           3 |
-|          24 | UNITED STATES  |           1 |
-+-------------+----------------+-------------+
++-------------+-----------------------------------------+
+| n_regionkey | map_agg(`n_nationkey`, `n_name`)        |
++-------------+-----------------------------------------+
+|           0 | {0:"ALGERIA"}                           |
+|           1 | {1:"ARGENTINA", 2:"BRAZIL", 3:"CANADA"} |
++-------------+-----------------------------------------+
 ```
 
 ```sql
-select `n_regionkey`, map_agg(`n_nationkey`, `n_name`) from `nation` group by 
`n_regionkey`;
+select map_agg(`n_name`, `n_nationkey` % 5) from `nation`;
 ```
 
 ```text
-+-------------+---------------------------------------------------------------------------+
-| n_regionkey | map_agg(`n_nationkey`, `n_name`)                               
           |
-+-------------+---------------------------------------------------------------------------+
-|           1 | {1:"ARGENTINA", 2:"BRAZIL", 3:"CANADA", 17:"PERU", 24:"UNITED 
STATES"}    |
-|           0 | {0:"ALGERIA", 5:"ETHIOPIA", 14:"KENYA", 15:"MOROCCO", 
16:"MOZAMBIQUE"}    |
-|           3 | {6:"FRANCE", 7:"GERMANY", 19:"ROMANIA", 22:"RUSSIA", 
23:"UNITED KINGDOM"} |
-|           4 | {4:"EGYPT", 10:"IRAN", 11:"IRAQ", 13:"JORDAN", 20:"SAUDI 
ARABIA"}         |
-|           2 | {8:"INDIA", 9:"INDONESIA", 12:"JAPAN", 18:"CHINA", 
21:"VIETNAM"}          |
-+-------------+---------------------------------------------------------------------------+
++------------------------------------------------------+
+| map_agg(`n_name`, `n_nationkey` % 5)                 |
++------------------------------------------------------+
+| {"ALGERIA":0, "ARGENTINA":1, "BRAZIL":2, "CANADA":3} |
++------------------------------------------------------+
 ```
 
 ```sql
-select n_regionkey, map_agg(`n_name`, `n_nationkey` % 5) from `nation` group 
by `n_regionkey`;
+select map_agg(`n_name`, `n_nationkey` % 5) from `nation` where n_nationkey is 
null;
 ```
 
 ```text
-+-------------+------------------------------------------------------------------------+
-| n_regionkey | map_agg(`n_name`, (`n_nationkey` % 5))                         
        |
-+-------------+------------------------------------------------------------------------+
-|           2 | {"INDIA":3, "INDONESIA":4, "JAPAN":2, "CHINA":3, "VIETNAM":1}  
        |
-|           0 | {"ALGERIA":0, "ETHIOPIA":0, "KENYA":4, "MOROCCO":0, 
"MOZAMBIQUE":1}    |
-|           3 | {"FRANCE":1, "GERMANY":2, "ROMANIA":4, "RUSSIA":2, "UNITED 
KINGDOM":3} |
-|           1 | {"ARGENTINA":1, "BRAZIL":2, "CANADA":3, "PERU":2, "UNITED 
STATES":4}   |
-|           4 | {"EGYPT":4, "IRAN":0, "IRAQ":1, "JORDAN":3, "SAUDI ARABIA":0}  
        |
-+-------------+------------------------------------------------------------------------+
++--------------------------------------+
+| map_agg(`n_name`, `n_nationkey` % 5) |
++--------------------------------------+
+| {}                                   |
++--------------------------------------+
 ```
+


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


Reply via email to