This is an automated email from the ASF dual-hosted git repository. panxiaolei pushed a commit to branch dev_0208 in repository https://gitbox.apache.org/repos/asf/doris-website.git
commit 8a5c8a7f9397648b0aae04de00f6de68eaddc433 Author: BiteTheDDDDt <x...@selectdb.com> AuthorDate: Sat Feb 8 10:34:43 2025 +0800 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 ++++-- .../version-2.0/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../version-2.0/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../version-2.0/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../version-2.1/sql-manual/sql-functions/combinators/foreach.md | 4 ++-- .../version-2.1/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../version-2.1/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../version-2.1/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../version-3.0/sql-manual/sql-functions/combinators/foreach.md | 4 ++-- .../version-3.0/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../version-3.0/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../version-3.0/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../version-2.0/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../version-2.0/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../version-2.0/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../version-2.1/sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../version-2.1/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../version-2.1/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../version-2.1/sql-manual/sql-functions/combinators/union.md | 6 ++++-- .../version-3.0/sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../version-3.0/sql-manual/sql-functions/combinators/merge.md | 6 ++++-- .../version-3.0/sql-manual/sql-functions/combinators/state.md | 6 ++++-- .../version-3.0/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 e26c77ceed8..a6b71fbbd82 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 91e59127598..9190a0e8bca 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 589257c07c4..3d2fadf3910 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 660e3d3a693..d83bfcb8ace 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 218a3e08448..02c9b4d429d 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 35ee8671136..997d42c8520 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 7a5e8224bd2..420c00caed6 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 ef25d8d728f..beb5a37a5e7 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 35ee8671136..997d42c8520 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 7a5e8224bd2..420c00caed6 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 ef25d8d728f..beb5a37a5e7 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 218a3e08448..02c9b4d429d 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 35ee8671136..997d42c8520 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 7a5e8224bd2..420c00caed6 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 ef25d8d728f..beb5a37a5e7 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 218a3e08448..02c9b4d429d 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 35ee8671136..997d42c8520 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 7a5e8224bd2..420c00caed6 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 ef25d8d728f..beb5a37a5e7 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 91e59127598..9190a0e8bca 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 589257c07c4..3d2fadf3910 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 660e3d3a693..d83bfcb8ace 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 e26c77ceed8..6b62381222e 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 91e59127598..9190a0e8bca 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 589257c07c4..3d2fadf3910 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 660e3d3a693..d83bfcb8ace 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 e26c77ceed8..6b62381222e 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 91e59127598..9190a0e8bca 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 589257c07c4..3d2fadf3910 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 660e3d3a693..d83bfcb8ace 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; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org