From 1a920681d5984caea679a4b8575b1299d8de8a68 Mon Sep 17 00:00:00 2001 From: boluor Date: Wed, 3 Jun 2026 01:27:27 +0000 Subject: [PATCH] [fix](docs) fix BITMAP_AGG example setup: k5 overflows BIGINT The dev BITMAP_AGG page declares `k5 BIGINT` in its setup table but inserts 18446744073709551615 and 18446744073709551616, which exceed the BIGINT range. The whole INSERT is rejected, leaving the table empty, so every example on the page fails. Change `k5` to VARCHAR(32) (and quote its values) so the large values are stored as written; BITMAP_AGG converts them and applies its own range rule (values < 0 or > 18446744073709551615 are dropped), reproducing the documented output. Verified end-to-end on a live master build: every example passes (EN + ZH). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../aggregate-functions/bitmap-agg.md | 14 +++++++------- .../aggregate-functions/bitmap-agg.md | 14 +++++++------- 2 files changed, 14 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 bc017ee22664c..120c984655a11 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 25cc2fa157bb7..abb3c39ad7b03 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); ```