This is an automated email from the ASF dual-hosted git repository. kassiez 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 48395eb9f57 adjust doc of combinator (#1994) 48395eb9f57 is described below commit 48395eb9f57def22b43255b42c54b68f54e3c515 Author: Pxl <pxl...@qq.com> AuthorDate: Mon Feb 10 11:13:06 2025 +0800 adjust doc of combinator (#1994) ## Versions - [X] dev - [X] 3.0 - [x] 2.1 - [x] 2.0 ## Languages - [x] Chinese - [x] English ## Docs Checklist - [x] Checked by AI - [x] Test Cases Built --- docs/sql-manual/sql-functions/combinators/foreach.md | 13 +++++-------- docs/sql-manual/sql-functions/combinators/merge.md | 14 +++++++------- docs/sql-manual/sql-functions/combinators/state.md | 14 +++++++------- docs/sql-manual/sql-functions/combinators/union.md | 14 +++++++------- .../sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../current/sql-manual/sql-functions/combinators/merge.md | 10 +++++----- .../current/sql-manual/sql-functions/combinators/state.md | 8 ++++---- .../current/sql-manual/sql-functions/combinators/union.md | 8 ++++---- .../sql-manual/sql-functions/combinators/merge.md | 10 +++++----- .../sql-manual/sql-functions/combinators/state.md | 8 ++++---- .../sql-manual/sql-functions/combinators/union.md | 8 ++++---- .../sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../sql-manual/sql-functions/combinators/merge.md | 10 +++++----- .../sql-manual/sql-functions/combinators/state.md | 8 ++++---- .../sql-manual/sql-functions/combinators/union.md | 8 ++++---- .../sql-manual/sql-functions/combinators/foreach.md | 6 ++---- .../sql-manual/sql-functions/combinators/merge.md | 10 +++++----- .../sql-manual/sql-functions/combinators/state.md | 8 ++++---- .../sql-manual/sql-functions/combinators/union.md | 8 ++++---- .../sql-manual/sql-functions/combinators/merge.md | 14 +++++++------- .../sql-manual/sql-functions/combinators/state.md | 12 ++++++------ .../sql-manual/sql-functions/combinators/union.md | 12 ++++++------ .../sql-manual/sql-functions/combinators/foreach.md | 12 ++++-------- .../sql-manual/sql-functions/combinators/merge.md | 14 +++++++------- .../sql-manual/sql-functions/combinators/state.md | 12 ++++++------ .../sql-manual/sql-functions/combinators/union.md | 12 ++++++------ .../sql-manual/sql-functions/combinators/foreach.md | 12 ++++-------- .../sql-manual/sql-functions/combinators/merge.md | 14 +++++++------- .../sql-manual/sql-functions/combinators/state.md | 12 ++++++------ .../sql-manual/sql-functions/combinators/union.md | 12 ++++++------ 30 files changed, 149 insertions(+), 166 deletions(-) diff --git a/docs/sql-manual/sql-functions/combinators/foreach.md b/docs/sql-manual/sql-functions/combinators/foreach.md index e26c77ceed8..7f7027d0419 100644 --- a/docs/sql-manual/sql-functions/combinators/foreach.md +++ b/docs/sql-manual/sql-functions/combinators/foreach.md @@ -24,18 +24,15 @@ specific language governing permissions and limitations under the License. --> -## FOREACH +## Description -### 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 +## Example ``` mysql [test]>select a , s from db; +-----------+---------------+ @@ -76,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 91e59127598..b72c49d129f 100644 --- a/docs/sql-manual/sql-functions/combinators/merge.md +++ b/docs/sql-manual/sql-functions/combinators/merge.md @@ -24,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE +## Description -### 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`. -### example +## Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + +## 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 589257c07c4..f9059ab6c80 100644 --- a/docs/sql-manual/sql-functions/combinators/state.md +++ b/docs/sql-manual/sql-functions/combinators/state.md @@ -24,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE +## Description -### 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...)`. -### example +## 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; +----------------+ @@ -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 660e3d3a693..bf11d0b3041 100644 --- a/docs/sql-manual/sql-functions/combinators/union.md +++ b/docs/sql-manual/sql-functions/combinators/union.md @@ -24,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION +## Description -### 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. -### example +## 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; +----------------+ @@ -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/foreach.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/combinators/foreach.md index 218a3e08448..f88dfdc08ae 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,14 +24,12 @@ specific language governing permissions and limitations 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..e9bd66b5cd9 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,15 +24,15 @@ specific language governing permissions and limitations 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; @@ -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/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..25b1bf3e65f 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,15 +24,15 @@ specific language governing permissions and limitations 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..453a75a3554 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,15 +24,15 @@ specific language governing permissions and limitations 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..e9bd66b5cd9 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,15 +24,15 @@ specific language governing permissions and limitations 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; @@ -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/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.0/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd2..25b1bf3e65f 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,15 +24,15 @@ specific language governing permissions and limitations 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..453a75a3554 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,15 +24,15 @@ specific language governing permissions and limitations 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..f88dfdc08ae 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,14 +24,12 @@ specific language governing permissions and limitations 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..e9bd66b5cd9 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,15 +24,15 @@ specific language governing permissions and limitations 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; @@ -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/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd2..25b1bf3e65f 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,15 +24,15 @@ specific language governing permissions and limitations 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..453a75a3554 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,15 +24,15 @@ specific language governing permissions and limitations 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..f88dfdc08ae 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,14 +24,12 @@ specific language governing permissions and limitations 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..e9bd66b5cd9 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,15 +24,15 @@ specific language governing permissions and limitations 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; @@ -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/state.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-functions/combinators/state.md index 7a5e8224bd2..25b1bf3e65f 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,15 +24,15 @@ specific language governing permissions and limitations 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..453a75a3554 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,15 +24,15 @@ specific language governing permissions and limitations 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..b72c49d129f 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE +## Description -### 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`. -### example +## Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + +## 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.0/sql-manual/sql-functions/combinators/state.md b/versioned_docs/version-2.0/sql-manual/sql-functions/combinators/state.md index 589257c07c4..d64208384cc 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE +## description -### 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...)`. -### example +## 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..39808d54dd2 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION +## description -### 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. -### example +## 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..8e78dde66b1 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,18 +24,14 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - -### description -#### Syntax - -`AGGREGATE_FUNCTION_FOREACH(arg...)` +## 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 +`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 91e59127598..b72c49d129f 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE +## Description -### 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`. -### example +## Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + +## 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/state.md b/versioned_docs/version-2.1/sql-manual/sql-functions/combinators/state.md index 589257c07c4..d64208384cc 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE +## description -### 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...)`. -### example +## 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..39808d54dd2 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION +## description -### 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. -### example +## 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..8e78dde66b1 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,18 +24,14 @@ specific language governing permissions and limitations under the License. --> -## FOREACH - -### description -#### Syntax - -`AGGREGATE_FUNCTION_FOREACH(arg...)` +## 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 +`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 91e59127598..b72c49d129f 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## MERGE +## Description -### 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`. -### example +## Syntax + +`AGGREGATE_FUNCTION_MERGE(agg_state)` + +## 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/state.md b/versioned_docs/version-3.0/sql-manual/sql-functions/combinators/state.md index 589257c07c4..d64208384cc 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## STATE +## description -### 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...)`. -### example +## 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..39808d54dd2 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,16 +24,16 @@ specific language governing permissions and limitations under the License. --> -## UNION +## description -### 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. -### example +## 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