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

morningman 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 6ff563c831f [fix](docs) BITMAP_AGG / MAP_AGG example setup (dev + 3.x 
+ 2.1) (#3895)
6ff563c831f is described below

commit 6ff563c831f6baec87399ebd14d298e005e4d9ec
Author: boluor <[email protected]>
AuthorDate: Tue Jun 2 23:54:51 2026 -0700

    [fix](docs) BITMAP_AGG / MAP_AGG example setup (dev + 3.x + 2.1) (#3895)
    
    Adds the missing CREATE TABLE + INSERT setup so the BITMAP_AGG and
    MAP_AGG examples are runnable end-to-end.
    
    - **bitmap-agg**: dev + version-3.x + version-2.1 (EN + ZH). Includes
    the dev k5-overflow fix (k5 `BIGINT` → `VARCHAR(32)`: the INSERT carries
    values `18446744073709551615/616` that overflow BIGINT and would reject
    the whole row, leaving the table empty; BITMAP_AGG converts the string
    per its domain rule, <0 or >uint64max dropped).
    - **map-agg**: version-3.x + version-2.1 (EN + ZH), TPC-H `nation` (25
    rows).
    
    Verified end-to-end on fresh single-BE clusters (4.1.1 / 3.1.4 / 2.1.11
    and local master daily build): every touched example reproduces the
    doc's printed output cell-for-cell.
    
    This supersedes #3897 (the dev k5 fix is folded in here so BITMAP_AGG
    lives in one PR).
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    ---------
    
    Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
---
 .../sql-functions/aggregate-functions/bitmap-agg.md  | 14 +++++++-------
 .../sql-functions/aggregate-functions/bitmap-agg.md  | 14 +++++++-------
 .../sql-functions/aggregate-functions/bitmap-agg.md  | 20 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/map-agg.md     | 14 ++++++++++++++
 .../sql-functions/aggregate-functions/bitmap-agg.md  | 20 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/map-agg.md     | 14 ++++++++++++++
 .../sql-functions/aggregate-functions/bitmap-agg.md  | 20 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/map-agg.md     | 14 ++++++++++++++
 .../sql-functions/aggregate-functions/bitmap-agg.md  | 20 ++++++++++++++++++++
 .../sql-functions/aggregate-functions/map-agg.md     | 14 ++++++++++++++
 10 files changed, 150 insertions(+), 14 deletions(-)

diff --git a/docs/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md 
b/docs/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
index bc017ee2266..120c984655a 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
@@ -38,16 +38,16 @@ CREATE TABLE test_bitmap_agg (
     k2 INT,
     k3 INT,
     k4 BIGINT,
-    k5 BIGINT
+    k5 VARCHAR(32)
 ) DISTRIBUTED BY HASH(id) BUCKETS 1
 PROPERTIES ("replication_num" = "1");
 INSERT INTO test_bitmap_agg VALUES
-    (1, 10, 110, 11, 300, 10000000000, 0),
-    (2, 20, 120, 21, 400, 20000000000, 200000000000000),
-    (3, 30, 130, 31, 350, 30000000000, 300000000000000),
-    (4, 40, 140, 41, 500, 40000000000, 18446744073709551616),
-    (5, 50, 150, 51, 250, 50000000000, 18446744073709551615),
-    (6, 60, 160, 61, 600, 60000000000, -1),
+    (1, 10, 110, 11, 300, 10000000000, '0'),
+    (2, 20, 120, 21, 400, 20000000000, '200000000000000'),
+    (3, 30, 130, 31, 350, 30000000000, '300000000000000'),
+    (4, 40, 140, 41, 500, 40000000000, '18446744073709551616'),
+    (5, 50, 150, 51, 250, 50000000000, '18446744073709551615'),
+    (6, 60, 160, 61, 600, 60000000000, '-1'),
     (7, 60, 160, 120, 600, 60000000000, NULL);
 ```
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
index 25cc2fa157b..abb3c39ad7b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
@@ -37,16 +37,16 @@ CREATE TABLE test_bitmap_agg (
        k2 INT,
        k3 INT,
        k4 BIGINT,
-       k5 BIGINT
+       k5 VARCHAR(32)
 ) DISTRIBUTED BY HASH(id) BUCKETS 1
 PROPERTIES ("replication_num" = "1");
 INSERT INTO test_bitmap_agg VALUES
-       (1, 10, 110, 11, 300, 10000000000, 0),
-       (2, 20, 120, 21, 400, 20000000000, 200000000000000),
-       (3, 30, 130, 31, 350, 30000000000, 300000000000000),
-       (4, 40, 140, 41, 500, 40000000000, 18446744073709551616),
-       (5, 50, 150, 51, 250, 50000000000, 18446744073709551615),
-       (6, 60, 160, 61, 600, 60000000000, -1),
+       (1, 10, 110, 11, 300, 10000000000, '0'),
+       (2, 20, 120, 21, 400, 20000000000, '200000000000000'),
+       (3, 30, 130, 31, 350, 30000000000, '300000000000000'),
+       (4, 40, 140, 41, 500, 40000000000, '18446744073709551616'),
+       (5, 50, 150, 51, 250, 50000000000, '18446744073709551615'),
+       (6, 60, 160, 61, 600, 60000000000, '-1'),
        (7, 60, 160, 120, 600, 60000000000, NULL);
 ```
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
index 2121ad107be..90300bac11e 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
@@ -29,6 +29,26 @@ BITMAP_AGG(<expr>)
 - 如果某个值小于 0 或者大于 18446744073709551615,该值会被忽略,不会合并到 Bitmap 中
 
 ## 举例
+```sql
+create table test_bitmap_agg(
+    id int,
+    k0 int,
+    k1 varchar(32),
+    k2 int,
+    k3 int,
+    k4 bigint,
+    k5 varchar(32)
+) properties('replication_num' = '1');
+insert into test_bitmap_agg values
+  (1, 10, '110', 11, 300, 10000000000, '0'),
+  (2, 20, '120', 21, 400, 20000000000, '200000000000000'),
+  (3, 30, '130', 31, 350, 30000000000, '300000000000000'),
+  (4, 40, '140', 41, 500, 40000000000, '18446744073709551616'),
+  (5, 50, '150', 51, 250, 50000000000, '18446744073709551615'),
+  (6, 60, '160', 61, 600, 60000000000, '-1'),
+  (7, 60, '160', 120, 600, 60000000000, NULL);
+```
+
 ```sql
 select * from test_bitmap_agg;
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
index 3f74b01fc49..36f363e0250 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
@@ -27,6 +27,20 @@ MAP_AGG 函数用于根据多行数据中的键值对形成一个映射结构。
 
 ## 举例
 
+```sql
+create table nation(
+    n_nationkey int,
+    n_name varchar(32),
+    n_regionkey int
+) properties('replication_num' = '1');
+insert into nation values
+  
(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);
+```
+
 ```sql
 select `n_nationkey`, `n_name`, `n_regionkey` from `nation`;
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
index 2121ad107be..90300bac11e 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
@@ -29,6 +29,26 @@ BITMAP_AGG(<expr>)
 - 如果某个值小于 0 或者大于 18446744073709551615,该值会被忽略,不会合并到 Bitmap 中
 
 ## 举例
+```sql
+create table test_bitmap_agg(
+    id int,
+    k0 int,
+    k1 varchar(32),
+    k2 int,
+    k3 int,
+    k4 bigint,
+    k5 varchar(32)
+) properties('replication_num' = '1');
+insert into test_bitmap_agg values
+  (1, 10, '110', 11, 300, 10000000000, '0'),
+  (2, 20, '120', 21, 400, 20000000000, '200000000000000'),
+  (3, 30, '130', 31, 350, 30000000000, '300000000000000'),
+  (4, 40, '140', 41, 500, 40000000000, '18446744073709551616'),
+  (5, 50, '150', 51, 250, 50000000000, '18446744073709551615'),
+  (6, 60, '160', 61, 600, 60000000000, '-1'),
+  (7, 60, '160', 120, 600, 60000000000, NULL);
+```
+
 ```sql
 select * from test_bitmap_agg;
 ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
index 3f74b01fc49..36f363e0250 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
@@ -27,6 +27,20 @@ MAP_AGG 函数用于根据多行数据中的键值对形成一个映射结构。
 
 ## 举例
 
+```sql
+create table nation(
+    n_nationkey int,
+    n_name varchar(32),
+    n_regionkey int
+) properties('replication_num' = '1');
+insert into nation values
+  
(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);
+```
+
 ```sql
 select `n_nationkey`, `n_name`, `n_regionkey` from `nation`;
 ```
diff --git 
a/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
 
b/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
index 232f09bbdfe..288aa2a5b09 100644
--- 
a/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
+++ 
b/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
@@ -30,6 +30,26 @@ Returns a BITMAP type value. Special cases:
 
 ## Example
 
+```sql
+create table test_bitmap_agg(
+    id int,
+    k0 int,
+    k1 varchar(32),
+    k2 int,
+    k3 int,
+    k4 bigint,
+    k5 varchar(32)
+) properties('replication_num' = '1');
+insert into test_bitmap_agg values
+  (1, 10, '110', 11, 300, 10000000000, '0'),
+  (2, 20, '120', 21, 400, 20000000000, '200000000000000'),
+  (3, 30, '130', 31, 350, 30000000000, '300000000000000'),
+  (4, 40, '140', 41, 500, 40000000000, '18446744073709551616'),
+  (5, 50, '150', 51, 250, 50000000000, '18446744073709551615'),
+  (6, 60, '160', 61, 600, 60000000000, '-1'),
+  (7, 60, '160', 120, 600, 60000000000, NULL);
+```
+
 ```sql
 select * from test_bitmap_agg;
 ```
diff --git 
a/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
 
b/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
index d99d86c3d1b..b24acbf42bf 100644
--- 
a/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
+++ 
b/versioned_docs/version-2.1/sql-manual/sql-functions/aggregate-functions/map-agg.md
@@ -27,6 +27,20 @@ Returns a value of the MAP type.
 
 ## Example
 
+```sql
+create table nation(
+    n_nationkey int,
+    n_name varchar(32),
+    n_regionkey int
+) properties('replication_num' = '1');
+insert into nation values
+  
(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);
+```
+
 ```sql
 select `n_nationkey`, `n_name`, `n_regionkey` from `nation`;
 ```
diff --git 
a/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
 
b/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
index 232f09bbdfe..288aa2a5b09 100644
--- 
a/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
+++ 
b/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/bitmap-agg.md
@@ -30,6 +30,26 @@ Returns a BITMAP type value. Special cases:
 
 ## Example
 
+```sql
+create table test_bitmap_agg(
+    id int,
+    k0 int,
+    k1 varchar(32),
+    k2 int,
+    k3 int,
+    k4 bigint,
+    k5 varchar(32)
+) properties('replication_num' = '1');
+insert into test_bitmap_agg values
+  (1, 10, '110', 11, 300, 10000000000, '0'),
+  (2, 20, '120', 21, 400, 20000000000, '200000000000000'),
+  (3, 30, '130', 31, 350, 30000000000, '300000000000000'),
+  (4, 40, '140', 41, 500, 40000000000, '18446744073709551616'),
+  (5, 50, '150', 51, 250, 50000000000, '18446744073709551615'),
+  (6, 60, '160', 61, 600, 60000000000, '-1'),
+  (7, 60, '160', 120, 600, 60000000000, NULL);
+```
+
 ```sql
 select * from test_bitmap_agg;
 ```
diff --git 
a/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
 
b/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
index d99d86c3d1b..b24acbf42bf 100644
--- 
a/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
+++ 
b/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/map-agg.md
@@ -27,6 +27,20 @@ Returns a value of the MAP type.
 
 ## Example
 
+```sql
+create table nation(
+    n_nationkey int,
+    n_name varchar(32),
+    n_regionkey int
+) properties('replication_num' = '1');
+insert into nation values
+  
(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);
+```
+
 ```sql
 select `n_nationkey`, `n_name`, `n_regionkey` from `nation`;
 ```


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

Reply via email to