From 469b8005d91c0676fb99d50bac353ba8200c1816 Mon Sep 17 00:00:00 2001 From: Song Gao Date: Mon, 6 Jan 2025 12:42:01 +0800 Subject: [PATCH 1/2] fix Signed-off-by: Song Gao --- .../sqls/functions/aggregate_functions.md | 18 +++++++++--------- .../sqls/functions/aggregate_functions.md | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/en_US/sqls/functions/aggregate_functions.md b/docs/en_US/sqls/functions/aggregate_functions.md index 46eb8442b7..8a56793829 100644 --- a/docs/en_US/sqls/functions/aggregate_functions.md +++ b/docs/en_US/sqls/functions/aggregate_functions.md @@ -12,7 +12,7 @@ as expressions only in the following: avg(col) ``` -The average of the values in a group. The null values will be ignored. +The average of the values in a group. The null values will be ignored. Supports incremental calculations. ## COUNT @@ -21,7 +21,7 @@ count(*) count(col) ``` -The number of items in a group. The null values will be ignored. +The number of items in a group. The null values will be ignored. Supports incremental calculations. ## MAX @@ -29,7 +29,7 @@ The number of items in a group. The null values will be ignored. max(col) ``` -The maximum value in a group. The null values will be ignored. +The maximum value in a group. The null values will be ignored. Supports incremental calculations. ## MIN @@ -37,7 +37,7 @@ The maximum value in a group. The null values will be ignored. min(col) ``` -The minimum value in a group. The null values will be ignored. +The minimum value in a group. The null values will be ignored. Supports incremental calculations. ## SUM @@ -45,7 +45,7 @@ The minimum value in a group. The null values will be ignored. sum(col) ``` -The sum of all the values in a group. The null values will be ignored. +The sum of all the values in a group. The null values will be ignored. Supports incremental calculations. ## COLLECT @@ -54,7 +54,7 @@ collect(*) collect(col) ``` -Returns an array with all columns or the whole record (when the parameter is *) values from the group. +Returns an array with all columns or the whole record (when the parameter is *) values from the group. Supports incremental calculations. ### Examples @@ -85,7 +85,7 @@ last_value(*, true) last_value(col, false) ``` -The last_value function is used to retrieve the value of the last row in a group for the specified column(s) or the entire message. It has two parameters, the first of which specifies the column(s) or the entire message, and the second of which specifies whether to ignore null values. If the second parameter is true, the function will only return the last non-null value. If there are no non-null values, the function will return null. If the second parameter is false, the function will return the last value, regardless of whether it is null or not. +The last_value function is used to retrieve the value of the last row in a group for the specified column(s) or the entire message. It has two parameters, the first of which specifies the column(s) or the entire message, and the second of which specifies whether to ignore null values. If the second parameter is true, the function will only return the last non-null value. If there are no non-null values, the function will return null. If the second parameter is false, the function will return the last value, regardless of whether it is null or not. Supports incremental calculations. ## MERGE_AGG @@ -93,7 +93,7 @@ The last_value function is used to retrieve the value of the last row in a group merge_agg(*) merge_agg(col) ``` - +Supports incremental calculations. Concatenate values from the group into a single value. It concatenates multiple objects by generating an object containing the union of their keys, taking the second object's value when there are duplicate keys. @@ -101,7 +101,7 @@ It does not operate recursively; only the top-level object structure is merged. If the parameter is a column, the result will be an object containing the union of the keys of all the objects in the column. -If the column contains only non-object values, the result will be an empty object. +If the column contains only non-object values, the result will be an empty object. ### Examples diff --git a/docs/zh_CN/sqls/functions/aggregate_functions.md b/docs/zh_CN/sqls/functions/aggregate_functions.md index 512faafb74..a29566dd93 100644 --- a/docs/zh_CN/sqls/functions/aggregate_functions.md +++ b/docs/zh_CN/sqls/functions/aggregate_functions.md @@ -11,7 +11,7 @@ avg(col) ``` -返回组中的平均值。空值不参与计算。 +返回组中的平均值。空值不参与计算。支持增量计算。 ## COUNT @@ -20,7 +20,7 @@ count(*) count(col) ``` -返回组中的项目数。空值不参与计算。 +返回组中的项目数。空值不参与计算。支持增量计算。 ## MAX @@ -28,7 +28,7 @@ count(col) max(col) ``` -返回组中的最大值。空值不参与计算。 +返回组中的最大值。空值不参与计算。支持增量计算。 ## MIN @@ -36,7 +36,7 @@ max(col) min(col) ``` -返回组中的最小值。空值不参与计算。 +返回组中的最小值。空值不参与计算。支持增量计算。 ## SUM @@ -44,7 +44,7 @@ min(col) sum(col) ``` -返回组中所有值的总和。空值不参与计算。 +返回组中所有值的总和。空值不参与计算。支持增量计算。 ## COLLECT @@ -53,7 +53,7 @@ collect(*) collect(col) ``` -返回组中指定的列或整个消息(参数为*时)的值组成的数组。 +返回组中指定的列或整个消息(参数为*时)的值组成的数组。支持增量计算。 ### 示例 @@ -82,7 +82,7 @@ last_value(*, true) last_value(col, false) ``` -用于返回在组中指定列或整个消息中最后一行的值。该函数有两个参数,第一个参数用于指定列或整个消息,第二个参数用于指定是否需要忽略空值;如果第二个参数为 true,则该函数仅返回最后的非空值,如果没有非空值,则返回空值;如果第二个参数为 false,则函数将返回最后的值,无论它是否为空。 +用于返回在组中指定列或整个消息中最后一行的值。该函数有两个参数,第一个参数用于指定列或整个消息,第二个参数用于指定是否需要忽略空值;如果第二个参数为 true,则该函数仅返回最后的非空值,如果没有非空值,则返回空值;如果第二个参数为 false,则函数将返回最后的值,无论它是否为空。支持增量计算。 ## MERGE_AGG @@ -93,7 +93,7 @@ merge_agg(col) 将组中的值合并为单个值。若存在重复键时取较后对象的值。它不进行递归操作;只合并顶级键值。 -如果参数是列,结果将是一个包含列中所有对象的键的联合的对象。如果列只包含非对象值,则结果将是一个空对象。 +如果参数是列,结果将是一个包含列中所有对象的键的联合的对象。如果列只包含非对象值,则结果将是一个空对象。支持增量计算。 ### 示例 From 80c422de80b6c1ed1574098924af0069567bc720 Mon Sep 17 00:00:00 2001 From: Song Gao Date: Mon, 6 Jan 2025 12:44:49 +0800 Subject: [PATCH 2/2] fix Signed-off-by: Song Gao --- docs/en_US/sqls/functions/aggregate_functions.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/en_US/sqls/functions/aggregate_functions.md b/docs/en_US/sqls/functions/aggregate_functions.md index 8a56793829..aa69315972 100644 --- a/docs/en_US/sqls/functions/aggregate_functions.md +++ b/docs/en_US/sqls/functions/aggregate_functions.md @@ -93,6 +93,7 @@ The last_value function is used to retrieve the value of the last row in a group merge_agg(*) merge_agg(col) ``` + Supports incremental calculations. Concatenate values from the group into a single value. It concatenates multiple objects by generating an object containing the union of their keys, @@ -101,7 +102,7 @@ It does not operate recursively; only the top-level object structure is merged. If the parameter is a column, the result will be an object containing the union of the keys of all the objects in the column. -If the column contains only non-object values, the result will be an empty object. +If the column contains only non-object values, the result will be an empty object. ### Examples