From 8a5c8a7f9397648b0aae04de00f6de68eaddc433 Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Sat, 8 Feb 2025 10:34:43 +0800 Subject: [PATCH 1/3] adjust doc of combinator --- docs/sql-manual/sql-functions/combinators/foreach.md | 5 ++--- docs/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- docs/sql-manual/sql-functions/combinators/state.md | 6 ++++-- docs/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../current/sql-manual/sql-functions/combinators/foreach.md | 4 ++-- .../current/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../current/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../current/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../sql-manual/sql-functions/combinators/foreach.md | 4 ++-- .../sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../sql-manual/sql-functions/combinators/foreach.md | 4 ++-- .../sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../sql-manual/sql-functions/combinators/union.md | 6 ++++-- 30 files changed, 108 insertions(+), 65 deletions(-) diff --git a/docs/sql-manual/sql-functions/combinators/foreach.md b/docs/sql-manual/sql-functions/combinators/foreach.md index e26c77ceed825..a6b71fbbd8251 100644 --- a/docs/sql-manual/sql-functions/combinators/foreach.md +++ b/docs/sql-manual/sql-functions/combinators/foreach.md @@ -27,13 +27,12 @@ under the License. ## FOREACH ### description -#### Syntax -`AGGREGATE_FUNCTION_FOREACH(arg...)` Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. +#### Syntax - +`AGGREGATE_FUNCTION_FOREACH(arg...)` ### example ``` diff --git a/docs/sql-manual/sql-functions/combinators/merge.md b/docs/sql-manual/sql-functions/combinators/merge.md index 91e591275983d..9190a0e8bca81 100644 --- a/docs/sql-manual/sql-functions/combinators/merge.md +++ b/docs/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ### description -#### Syntax -`AGGREGATE_FUNCTION_MERGE(agg_state)` The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. +#### Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ### example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/docs/sql-manual/sql-functions/combinators/state.md b/docs/sql-manual/sql-functions/combinators/state.md index 589257c07c4ba..3d2fadf391029 100644 --- a/docs/sql-manual/sql-functions/combinators/state.md +++ b/docs/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ### description -#### Syntax -`AGGREGATE_FUNCTION_STATE(arg...)` Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. +#### Syntax + +`AGGREGATE_FUNCTION_STATE(arg...)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/docs/sql-manual/sql-functions/combinators/union.md b/docs/sql-manual/sql-functions/combinators/union.md index 660e3d3a69382..d83bfcb8ace81 100644 --- a/docs/sql-manual/sql-functions/combinators/union.md +++ b/docs/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ### description -#### Syntax -`AGGREGATE_FUNCTION_UNION(agg_state)` Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. +#### Syntax + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md index 218a3e0844892..02c9b4d429d46 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md @@ -27,11 +27,11 @@ under the License. ## FOREACH ## 描述 +将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 + ## 语法 `AGGREGATE_FUNCTION_FOREACH(arg...)` -将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 - ## 举例 ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md index 35ee86711367f..997d42c852065 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_MERGE(agg_state)` 将聚合中间结果进行聚合并计算获得实际结果。 结果的类型与`AGGREGATE_FUNCTION`一致。 +## 语法 + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd29a..420c00caed6eb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_STATE(arg...)` 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 结果的类型为agg_state,agg_state中的函数签名为`AGGREGATE_FUNCTION(arg...)`。 +## 语法 + +`AGGREGATE_FUNCTION_STATE(arg...)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md index ef25d8d728f10..beb5a37a5e7dc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ## 描述 -## 语法 -`AGGREGATE_FUNCTION_UNION(agg_state)` 将多个聚合中间结果聚合为一个。 结果的类型为agg_state,函数签名与入参一致。 +## 语法 + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md index 35ee86711367f..997d42c852065 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_MERGE(agg_state)` 将聚合中间结果进行聚合并计算获得实际结果。 结果的类型与`AGGREGATE_FUNCTION`一致。 +## 语法 + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd29a..420c00caed6eb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_STATE(arg...)` 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 结果的类型为agg_state,agg_state中的函数签名为`AGGREGATE_FUNCTION(arg...)`。 +## 语法 + +`AGGREGATE_FUNCTION_STATE(arg...)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md index ef25d8d728f10..beb5a37a5e7dc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ## 描述 -## 语法 -`AGGREGATE_FUNCTION_UNION(agg_state)` 将多个聚合中间结果聚合为一个。 结果的类型为agg_state,函数签名与入参一致。 +## 语法 + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md index 218a3e0844892..02c9b4d429d46 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md @@ -27,11 +27,11 @@ under the License. ## FOREACH ## 描述 +将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 + ## 语法 `AGGREGATE_FUNCTION_FOREACH(arg...)` -将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 - ## 举例 ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md index 35ee86711367f..997d42c852065 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_MERGE(agg_state)` 将聚合中间结果进行聚合并计算获得实际结果。 结果的类型与`AGGREGATE_FUNCTION`一致。 +## 语法 + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd29a..420c00caed6eb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_STATE(arg...)` 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 结果的类型为agg_state,agg_state中的函数签名为`AGGREGATE_FUNCTION(arg...)`。 +## 语法 + +`AGGREGATE_FUNCTION_STATE(arg...)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md index ef25d8d728f10..beb5a37a5e7dc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ## 描述 -## 语法 -`AGGREGATE_FUNCTION_UNION(agg_state)` 将多个聚合中间结果聚合为一个。 结果的类型为agg_state,函数签名与入参一致。 +## 语法 + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md index 218a3e0844892..02c9b4d429d46 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md @@ -27,11 +27,11 @@ under the License. ## FOREACH ## 描述 +将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 + ## 语法 `AGGREGATE_FUNCTION_FOREACH(arg...)` -将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 - ## 举例 ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md index 35ee86711367f..997d42c852065 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_MERGE(agg_state)` 将聚合中间结果进行聚合并计算获得实际结果。 结果的类型与`AGGREGATE_FUNCTION`一致。 +## 语法 + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd29a..420c00caed6eb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ## 描述 -## 语法 -`AGGREGATE_FUNCTION_STATE(arg...)` 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 结果的类型为agg_state,agg_state中的函数签名为`AGGREGATE_FUNCTION(arg...)`。 +## 语法 + +`AGGREGATE_FUNCTION_STATE(arg...)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md index ef25d8d728f10..beb5a37a5e7dc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ## 描述 -## 语法 -`AGGREGATE_FUNCTION_UNION(agg_state)` 将多个聚合中间结果聚合为一个。 结果的类型为agg_state,函数签名与入参一致。 +## 语法 + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ## 举例 ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md index 91e591275983d..9190a0e8bca81 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ### description -#### Syntax -`AGGREGATE_FUNCTION_MERGE(agg_state)` The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. +#### Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ### example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md index 589257c07c4ba..3d2fadf391029 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ### description -#### Syntax -`AGGREGATE_FUNCTION_STATE(arg...)` Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. +#### Syntax + +`AGGREGATE_FUNCTION_STATE(arg...)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md index 660e3d3a69382..d83bfcb8ace81 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ### description -#### Syntax -`AGGREGATE_FUNCTION_UNION(agg_state)` Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. +#### Syntax + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md index e26c77ceed825..6b62381222e12 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md @@ -27,13 +27,11 @@ under the License. ## FOREACH ### description -#### Syntax - -`AGGREGATE_FUNCTION_FOREACH(arg...)` Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. +#### Syntax - +`AGGREGATE_FUNCTION_FOREACH(arg...)` ### example ``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md index 91e591275983d..9190a0e8bca81 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ### description -#### Syntax -`AGGREGATE_FUNCTION_MERGE(agg_state)` The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. +#### Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ### example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md index 589257c07c4ba..3d2fadf391029 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ### description -#### Syntax -`AGGREGATE_FUNCTION_STATE(arg...)` Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. +#### Syntax + +`AGGREGATE_FUNCTION_STATE(arg...)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md index 660e3d3a69382..d83bfcb8ace81 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ### description -#### Syntax -`AGGREGATE_FUNCTION_UNION(agg_state)` Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. +#### Syntax + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md index e26c77ceed825..6b62381222e12 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md @@ -27,13 +27,11 @@ under the License. ## FOREACH ### description -#### Syntax - -`AGGREGATE_FUNCTION_FOREACH(arg...)` Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. +#### Syntax - +`AGGREGATE_FUNCTION_FOREACH(arg...)` ### example ``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md index 91e591275983d..9190a0e8bca81 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md @@ -27,12 +27,14 @@ under the License. ## MERGE ### description -#### Syntax -`AGGREGATE_FUNCTION_MERGE(agg_state)` The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. +#### Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + ### example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md index 589257c07c4ba..3d2fadf391029 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md @@ -27,12 +27,14 @@ under the License. ## STATE ### description -#### Syntax -`AGGREGATE_FUNCTION_STATE(arg...)` Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. +#### Syntax + +`AGGREGATE_FUNCTION_STATE(arg...)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md index 660e3d3a69382..d83bfcb8ace81 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md @@ -27,12 +27,14 @@ under the License. ## UNION ### description -#### Syntax -`AGGREGATE_FUNCTION_UNION(agg_state)` Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. +#### Syntax + +`AGGREGATE_FUNCTION_UNION(agg_state)` + ### example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; From dc2cf747a07dc28fac77985d7153c832610bcd44 Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Sat, 8 Feb 2025 11:10:59 +0800 Subject: [PATCH 2/3] update --- docs/sql-manual/sql-functions/combinators/foreach.md | 8 +++----- docs/sql-manual/sql-functions/combinators/merge.md | 8 +++----- docs/sql-manual/sql-functions/combinators/state.md | 8 +++----- docs/sql-manual/sql-functions/combinators/union.md | 8 +++----- .../sql-manual/sql-functions/combinators/foreach.md | 2 -- .../current/sql-manual/sql-functions/combinators/merge.md | 2 -- .../current/sql-manual/sql-functions/combinators/state.md | 2 -- .../current/sql-manual/sql-functions/combinators/union.md | 2 -- .../sql-manual/sql-functions/combinators/merge.md | 2 -- .../sql-manual/sql-functions/combinators/state.md | 2 -- .../sql-manual/sql-functions/combinators/union.md | 2 -- .../sql-manual/sql-functions/combinators/foreach.md | 2 -- .../sql-manual/sql-functions/combinators/merge.md | 2 -- .../sql-manual/sql-functions/combinators/state.md | 2 -- .../sql-manual/sql-functions/combinators/union.md | 2 -- .../sql-manual/sql-functions/combinators/foreach.md | 2 -- .../sql-manual/sql-functions/combinators/merge.md | 2 -- .../sql-manual/sql-functions/combinators/state.md | 2 -- .../sql-manual/sql-functions/combinators/union.md | 2 -- .../sql-manual/sql-functions/combinators/merge.md | 8 +++----- .../sql-manual/sql-functions/combinators/state.md | 8 +++----- .../sql-manual/sql-functions/combinators/union.md | 8 +++----- .../sql-manual/sql-functions/combinators/foreach.md | 8 +++----- .../sql-manual/sql-functions/combinators/merge.md | 8 +++----- .../sql-manual/sql-functions/combinators/state.md | 8 +++----- .../sql-manual/sql-functions/combinators/union.md | 8 +++----- .../sql-manual/sql-functions/combinators/foreach.md | 8 +++----- .../sql-manual/sql-functions/combinators/merge.md | 8 +++----- .../sql-manual/sql-functions/combinators/state.md | 8 +++----- .../sql-manual/sql-functions/combinators/union.md | 8 +++----- 30 files changed, 45 insertions(+), 105 deletions(-) diff --git a/docs/sql-manual/sql-functions/combinators/foreach.md b/docs/sql-manual/sql-functions/combinators/foreach.md index a6b71fbbd8251..d8c7fb14723e6 100644 --- a/docs/sql-manual/sql-functions/combinators/foreach.md +++ b/docs/sql-manual/sql-functions/combinators/foreach.md @@ -24,17 +24,15 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - -### description +## description Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_FOREACH(arg...)` -### example +## example ``` mysql [test]>select a , s from db; +-----------+---------------+ diff --git a/docs/sql-manual/sql-functions/combinators/merge.md b/docs/sql-manual/sql-functions/combinators/merge.md index 9190a0e8bca81..5b5501c74270b 100644 --- a/docs/sql-manual/sql-functions/combinators/merge.md +++ b/docs/sql-manual/sql-functions/combinators/merge.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE - -### description +## description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_MERGE(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ diff --git a/docs/sql-manual/sql-functions/combinators/state.md b/docs/sql-manual/sql-functions/combinators/state.md index 3d2fadf391029..d64208384cc1c 100644 --- a/docs/sql-manual/sql-functions/combinators/state.md +++ b/docs/sql-manual/sql-functions/combinators/state.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE - -### description +## description Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_STATE(arg...)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/docs/sql-manual/sql-functions/combinators/union.md b/docs/sql-manual/sql-functions/combinators/union.md index d83bfcb8ace81..39808d54dd2ef 100644 --- a/docs/sql-manual/sql-functions/combinators/union.md +++ b/docs/sql-manual/sql-functions/combinators/union.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION - -### description +## description Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_UNION(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md index 02c9b4d429d46..f88dfdc08aefa 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - ## 描述 将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md index 997d42c852065..4d51540bd81a8 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## MERGE - ## 描述 将聚合中间结果进行聚合并计算获得实际结果。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md index 420c00caed6eb..25b1bf3e65f78 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/state.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## STATE - ## 描述 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md index beb5a37a5e7dc..453a75a35549a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/union.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## UNION - ## 描述 将多个聚合中间结果聚合为一个。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md index 997d42c852065..4d51540bd81a8 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## MERGE - ## 描述 将聚合中间结果进行聚合并计算获得实际结果。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md index 420c00caed6eb..25b1bf3e65f78 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## STATE - ## 描述 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md index beb5a37a5e7dc..453a75a35549a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/union.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## UNION - ## 描述 将多个聚合中间结果聚合为一个。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md index 02c9b4d429d46..f88dfdc08aefa 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - ## 描述 将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md index 997d42c852065..4d51540bd81a8 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## MERGE - ## 描述 将聚合中间结果进行聚合并计算获得实际结果。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md index 420c00caed6eb..25b1bf3e65f78 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## STATE - ## 描述 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md index beb5a37a5e7dc..453a75a35549a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/union.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## UNION - ## 描述 将多个聚合中间结果聚合为一个。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md index 02c9b4d429d46..f88dfdc08aefa 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - ## 描述 将表的聚合函数转换为聚合相应数组项并返回结果数组的数组的聚合函数。 例如, `sum_foreach` 对于数组 [1, 2], [3, 4, 5]和[6, 7]返回结果 [10, 13, 5] 之后将相应的数组项添加在一起。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md index 997d42c852065..4d51540bd81a8 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## MERGE - ## 描述 将聚合中间结果进行聚合并计算获得实际结果。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md index 420c00caed6eb..25b1bf3e65f78 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## STATE - ## 描述 返回聚合函数的中间结果,可以用于后续的聚合或者通过merge组合器获得实际计算结果,也可以直接写入agg_state类型的表保存下来。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md index beb5a37a5e7dc..453a75a35549a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/union.md @@ -24,8 +24,6 @@ specific language governing permissions and limitations under the License. --> -## UNION - ## 描述 将多个聚合中间结果聚合为一个。 diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md index 9190a0e8bca81..5b5501c74270b 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE - -### description +## description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_MERGE(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md index 3d2fadf391029..d64208384cc1c 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE - -### description +## description Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_STATE(arg...)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md index d83bfcb8ace81..39808d54dd2ef 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/union.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION - -### description +## description Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_UNION(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md index 6b62381222e12..8e78dde66b18a 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/foreach.md @@ -24,16 +24,14 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - -### description +## description Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_FOREACH(arg...)` -### example +## example ``` mysql [test]>select a , s from db; +-----------+---------------+ diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md index 9190a0e8bca81..5b5501c74270b 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE - -### description +## description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_MERGE(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md index 3d2fadf391029..d64208384cc1c 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE - -### description +## description Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_STATE(arg...)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md index d83bfcb8ace81..39808d54dd2ef 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/union.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION - -### description +## description Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_UNION(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md index 6b62381222e12..8e78dde66b18a 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/foreach.md @@ -24,16 +24,14 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - -### description +## description Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_FOREACH(arg...)` -### example +## example ``` mysql [test]>select a , s from db; +-----------+---------------+ diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md index 9190a0e8bca81..5b5501c74270b 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE - -### description +## description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_MERGE(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md index 3d2fadf391029..d64208384cc1c 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE - -### description +## description Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_STATE(arg...)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md index d83bfcb8ace81..39808d54dd2ef 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/union.md @@ -24,18 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION - -### description +## description Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. -#### Syntax +## Syntax `AGGREGATE_FUNCTION_UNION(agg_state)` -### example +## example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ From f9979b36b5f4e27905ce0e3fba6ce0fd21676975 Mon Sep 17 00:00:00 2001 From: BiteTheDDDDt Date: Sat, 8 Feb 2025 11:50:42 +0800 Subject: [PATCH 3/3] update --- docs/sql-manual/sql-functions/combinators/foreach.md | 6 +++--- docs/sql-manual/sql-functions/combinators/merge.md | 6 +++--- docs/sql-manual/sql-functions/combinators/state.md | 6 +++--- docs/sql-manual/sql-functions/combinators/union.md | 6 +++--- .../current/sql-manual/sql-functions/combinators/merge.md | 2 +- .../sql-manual/sql-functions/combinators/merge.md | 2 +- .../sql-manual/sql-functions/combinators/merge.md | 2 +- .../sql-manual/sql-functions/combinators/merge.md | 2 +- .../sql-manual/sql-functions/combinators/merge.md | 6 +++--- .../sql-manual/sql-functions/combinators/merge.md | 6 +++--- .../sql-manual/sql-functions/combinators/merge.md | 6 +++--- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/sql-manual/sql-functions/combinators/foreach.md b/docs/sql-manual/sql-functions/combinators/foreach.md index d8c7fb14723e6..7f7027d0419ac 100644 --- a/docs/sql-manual/sql-functions/combinators/foreach.md +++ b/docs/sql-manual/sql-functions/combinators/foreach.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description Converts an aggregate function for tables into an aggregate function for arrays that aggregates the corresponding array items and returns an array of results. For example, sum_foreach for the arrays [1, 2], [3, 4, 5]and[6, 7]returns the result [10, 13, 5] after adding together the corresponding array items. @@ -32,7 +32,7 @@ Converts an aggregate function for tables into an aggregate function for arrays `AGGREGATE_FUNCTION_FOREACH(arg...)` -## example +## Example ``` mysql [test]>select a , s from db; +-----------+---------------+ @@ -73,5 +73,5 @@ mysql [test]>select map_agg_foreach(a,a) from db; | [{1:1, 20:20, 100:100}, {2:2}, {3:3}] | +---------------------------------------+ ``` -### keywords +### Keywords FOREACH \ No newline at end of file diff --git a/docs/sql-manual/sql-functions/combinators/merge.md b/docs/sql-manual/sql-functions/combinators/merge.md index 5b5501c74270b..b72c49d129f33 100644 --- a/docs/sql-manual/sql-functions/combinators/merge.md +++ b/docs/sql-manual/sql-functions/combinators/merge.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. @@ -33,7 +33,7 @@ The type of the result is consistent with `AGGREGATE_FUNCTION`. `AGGREGATE_FUNCTION_MERGE(agg_state)` -## example +## Example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/docs/sql-manual/sql-functions/combinators/state.md b/docs/sql-manual/sql-functions/combinators/state.md index d64208384cc1c..f9059ab6c8024 100644 --- a/docs/sql-manual/sql-functions/combinators/state.md +++ b/docs/sql-manual/sql-functions/combinators/state.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description Returns the intermediate result of the aggregation function, which can be used for subsequent aggregation or to obtain the actual calculation result through the merge combiner, or can be directly written into the agg_state type table and saved. The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION(arg...)`. @@ -33,7 +33,7 @@ The type of the result is agg_state, and the function signature in agg_state is `AGGREGATE_FUNCTION_STATE(arg...)` -## example +## Example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from | 1 | +----------------+ ``` -### keywords +### Keywords AGG_STATE,STATE diff --git a/docs/sql-manual/sql-functions/combinators/union.md b/docs/sql-manual/sql-functions/combinators/union.md index 39808d54dd2ef..bf11d0b304192 100644 --- a/docs/sql-manual/sql-functions/combinators/union.md +++ b/docs/sql-manual/sql-functions/combinators/union.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description Aggregate multiple aggregation intermediate results into one. The type of the result is agg_state, and the function signature is consistent with the input parameter. @@ -33,7 +33,7 @@ The type of the result is agg_state, and the function signature is consistent wi `AGGREGATE_FUNCTION_UNION(agg_state)` -## example +## Example ``` mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from d_table group by k1)p; +----------------+ @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(t) from (select avg_union(avg_state(1)) as t from | 1 | +----------------+ ``` -### keywords +### Keywords AGG_STATE, UNION diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md index 4d51540bd81a8..e9bd66b5cd971 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/merge.md @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md index 4d51540bd81a8..e9bd66b5cd971 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/merge.md @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md index 4d51540bd81a8..e9bd66b5cd971 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/merge.md @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md index 4d51540bd81a8..e9bd66b5cd971 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/merge.md @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md index 5b5501c74270b..b72c49d129f33 100644 --- a/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/merge.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. @@ -33,7 +33,7 @@ The type of the result is consistent with `AGGREGATE_FUNCTION`. `AGGREGATE_FUNCTION_MERGE(agg_state)` -## example +## Example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md index 5b5501c74270b..b72c49d129f33 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/merge.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. @@ -33,7 +33,7 @@ The type of the result is consistent with `AGGREGATE_FUNCTION`. `AGGREGATE_FUNCTION_MERGE(agg_state)` -## example +## Example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE diff --git a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md index 5b5501c74270b..b72c49d129f33 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md +++ b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/merge.md @@ -24,7 +24,7 @@ specific language governing permissions and limitations under the License. --> -## description +## Description The aggregated intermediate results are aggregated and calculated to obtain the actual result. The type of the result is consistent with `AGGREGATE_FUNCTION`. @@ -33,7 +33,7 @@ The type of the result is consistent with `AGGREGATE_FUNCTION`. `AGGREGATE_FUNCTION_MERGE(agg_state)` -## example +## Example ``` mysql [test]>select avg_merge(avg_state(1)) from d_table; +-------------------------+ @@ -42,5 +42,5 @@ mysql [test]>select avg_merge(avg_state(1)) from d_table; | 1 | +-------------------------+ ``` -### keywords +### Keywords AGG_STATE, MERGE