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 d58259f502b9 [docs] Correct RETENTION sample data and empty-input
query (#4615)
d58259f502b9 is described below
commit d58259f502b9412dea12f90d0a896883959a47ea
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Fri Nov 13 08:02:11 2026 +0800
[docs] Correct RETENTION sample data and empty-input query (#4615)
Make the inserted NULL-handling rows agree with the displayed table and
subsequent explanations, order the sample-table query by uid, and use
the existing flag column in the empty-input example. Preserve the
intended NULL-handling results.
Fixes #3904
Versions and languages: dev, 4.x and 3.x; English and Chinese.
Source verification:
- branch-3.1
be/src/vec/aggregate_functions/aggregate_function_retention.h ORs each
input event and combines it with the first event
- The table defines uid, flag and flag2, so date is not a valid
expression in the empty-input query
- Rows (0,true,NULL),(1,false,false) match the existing output and
explanations for examples 5–7
Validation:
- Compared corrected input rows with all downstream expected results
- Confirmed empty-input query references a defined column and filters
every inserted row
- Checked identical changes across six active EN/ZH pages
- git diff --check
Review:
- Goal: correct the reported documentation issue; the changed content
directly addresses it.
- Scope: targeted documentation edits.
- Information architecture: active version and locale counterparts
inspected; archived snapshots unchanged.
- Navigation: no paths, slugs, anchors or sidebar entries changed.
- Frontend/build: no framework, styling or build-script changes.
- Validation limits: no live Doris execution or full website build
performed.
- Other concerns: No additional correctness, usability, accessibility,
SEO or maintainability issues found in the changed content.
Co-authored-by: morningman <[email protected]>
---
docs/sql-manual/sql-functions/aggregate-functions/retention.md | 8 ++++----
.../sql-manual/sql-functions/aggregate-functions/retention.md | 8 ++++----
.../sql-manual/sql-functions/aggregate-functions/retention.md | 8 ++++----
.../sql-manual/sql-functions/aggregate-functions/retention.md | 8 ++++----
.../sql-manual/sql-functions/aggregate-functions/retention.md | 8 ++++----
.../sql-manual/sql-functions/aggregate-functions/retention.md | 8 ++++----
6 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/docs/sql-manual/sql-functions/aggregate-functions/retention.md
b/docs/sql-manual/sql-functions/aggregate-functions/retention.md
index 2c906c725dd8..7fb4b378299b 100644
--- a/docs/sql-manual/sql-functions/aggregate-functions/retention.md
+++ b/docs/sql-manual/sql-functions/aggregate-functions/retention.md
@@ -93,9 +93,9 @@ PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
-INSERT into retention_test2 values (0, false, false), (1, true, NULL);
+INSERT into retention_test2 values (0, true, NULL), (1, false, false);
-SELECT * from retention_test2;
+SELECT * FROM retention_test2 ORDER BY uid;
```
```text
@@ -111,7 +111,7 @@ SELECT * from retention_test2;
4. When performing calculations on an empty table, no data participates in
aggregation, and NULL values are returned.
```sql
-SELECT RETENTION(date = '2022-10-12') AS r FROM retention_test2 where uid is
NULL;
+SELECT RETENTION(flag) AS r FROM retention_test2 WHERE uid IS NULL;
```
```text
@@ -153,7 +153,7 @@ select retention(flag,flag2) from retention_test2;
7. To resolve NULL value issues, you can use the IFNULL function to convert
NULL to false, ensuring that both rows with uid = 0 and uid = 1 are included in
the aggregate calculation.
```sql
-select retention(flag,IFNULL(flag2,false)) from retention_test2;;
+select retention(flag,IFNULL(flag2,false)) from retention_test2;
```
```text
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/retention.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/retention.md
index 6b968618b75b..44fd9208ab00 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/retention.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/aggregate-functions/retention.md
@@ -93,9 +93,9 @@ PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
-INSERT into retention_test2 values (0, false, false), (1, true, NULL);
+INSERT into retention_test2 values (0, true, NULL), (1, false, false);
-SELECT * from retention_test2;
+SELECT * FROM retention_test2 ORDER BY uid;
```
```text
@@ -111,7 +111,7 @@ SELECT * from retention_test2;
4. 空表计算时,没有任何数据参与聚合,返回 NULL 值
```sql
-SELECT RETENTION(date = '2022-10-12') AS r FROM retention_test2 where uid is
NULL;
+SELECT RETENTION(flag) AS r FROM retention_test2 WHERE uid IS NULL;
```
```text
@@ -153,7 +153,7 @@ select retention(flag,flag2) from retention_test2;
7. 如果需要解决NULL值问题,可以用IFNULL 函数将NULL转换成false,这样 uid = 0,1 两行都会参与聚合计算
```sql
-select retention(flag,IFNULL(flag2,false)) from retention_test2;;
+select retention(flag,IFNULL(flag2,false)) from retention_test2;
```
```text
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
index 1c00f796b36c..1011d6fa2e6c 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
@@ -95,9 +95,9 @@ PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
-INSERT into retention_test2 values (0, false, false), (1, true, NULL);
+INSERT into retention_test2 values (0, true, NULL), (1, false, false);
-SELECT * from retention_test2;
+SELECT * FROM retention_test2 ORDER BY uid;
```
```text
@@ -113,7 +113,7 @@ SELECT * from retention_test2;
4. 空表计算时,没有任何数据参与聚合,返回 NULL 值
```sql
-SELECT RETENTION(date = '2022-10-12') AS r FROM retention_test2 where uid is
NULL;
+SELECT RETENTION(flag) AS r FROM retention_test2 WHERE uid IS NULL;
```
```text
@@ -155,7 +155,7 @@ select retention(flag,flag2) from retention_test2;
7. 如果需要解决NULL值问题,可以用IFNULL 函数将NULL转换成false,这样 uid = 0,1 两行都会参与聚合计算
```sql
-select retention(flag,IFNULL(flag2,false)) from retention_test2;;
+select retention(flag,IFNULL(flag2,false)) from retention_test2;
```
```text
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
index 6b968618b75b..44fd9208ab00 100644
---
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
@@ -93,9 +93,9 @@ PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
-INSERT into retention_test2 values (0, false, false), (1, true, NULL);
+INSERT into retention_test2 values (0, true, NULL), (1, false, false);
-SELECT * from retention_test2;
+SELECT * FROM retention_test2 ORDER BY uid;
```
```text
@@ -111,7 +111,7 @@ SELECT * from retention_test2;
4. 空表计算时,没有任何数据参与聚合,返回 NULL 值
```sql
-SELECT RETENTION(date = '2022-10-12') AS r FROM retention_test2 where uid is
NULL;
+SELECT RETENTION(flag) AS r FROM retention_test2 WHERE uid IS NULL;
```
```text
@@ -153,7 +153,7 @@ select retention(flag,flag2) from retention_test2;
7. 如果需要解决NULL值问题,可以用IFNULL 函数将NULL转换成false,这样 uid = 0,1 两行都会参与聚合计算
```sql
-select retention(flag,IFNULL(flag2,false)) from retention_test2;;
+select retention(flag,IFNULL(flag2,false)) from retention_test2;
```
```text
diff --git
a/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
b/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
index 1ca801baa758..144e97677988 100644
---
a/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
+++
b/versioned_docs/version-3.x/sql-manual/sql-functions/aggregate-functions/retention.md
@@ -96,9 +96,9 @@ PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
-INSERT into retention_test2 values (0, false, false), (1, true, NULL);
+INSERT into retention_test2 values (0, true, NULL), (1, false, false);
-SELECT * from retention_test2;
+SELECT * FROM retention_test2 ORDER BY uid;
```
```text
@@ -114,7 +114,7 @@ SELECT * from retention_test2;
4. When performing calculations on an empty table, no data participates in
aggregation, and NULL values are returned.
```sql
-SELECT RETENTION(date = '2022-10-12') AS r FROM retention_test2 where uid is
NULL;
+SELECT RETENTION(flag) AS r FROM retention_test2 WHERE uid IS NULL;
```
```text
@@ -156,7 +156,7 @@ select retention(flag,flag2) from retention_test2;
7. To resolve NULL value issues, you can use the IFNULL function to convert
NULL to false, ensuring that both rows with uid = 0 and uid = 1 are included in
the aggregate calculation.
```sql
-select retention(flag,IFNULL(flag2,false)) from retention_test2;;
+select retention(flag,IFNULL(flag2,false)) from retention_test2;
```
```text
diff --git
a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
index 2c906c725dd8..7fb4b378299b 100644
---
a/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
+++
b/versioned_docs/version-4.x/sql-manual/sql-functions/aggregate-functions/retention.md
@@ -93,9 +93,9 @@ PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
-INSERT into retention_test2 values (0, false, false), (1, true, NULL);
+INSERT into retention_test2 values (0, true, NULL), (1, false, false);
-SELECT * from retention_test2;
+SELECT * FROM retention_test2 ORDER BY uid;
```
```text
@@ -111,7 +111,7 @@ SELECT * from retention_test2;
4. When performing calculations on an empty table, no data participates in
aggregation, and NULL values are returned.
```sql
-SELECT RETENTION(date = '2022-10-12') AS r FROM retention_test2 where uid is
NULL;
+SELECT RETENTION(flag) AS r FROM retention_test2 WHERE uid IS NULL;
```
```text
@@ -153,7 +153,7 @@ select retention(flag,flag2) from retention_test2;
7. To resolve NULL value issues, you can use the IFNULL function to convert
NULL to false, ensuring that both rows with uid = 0 and uid = 1 are included in
the aggregate calculation.
```sql
-select retention(flag,IFNULL(flag2,false)) from retention_test2;;
+select retention(flag,IFNULL(flag2,false)) from retention_test2;
```
```text
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]