Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Song Gao <[email protected]>
  • Loading branch information
Yisaer committed Jan 6, 2025
1 parent d41a893 commit 469b800
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions docs/en_US/sqls/functions/aggregate_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -21,31 +21,31 @@ 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

```text
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

```text
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

```text
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

Expand All @@ -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

Expand Down Expand Up @@ -85,23 +85,23 @@ 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
```text
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.
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

Expand Down
16 changes: 8 additions & 8 deletions docs/zh_CN/sqls/functions/aggregate_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
avg(col)
```

返回组中的平均值。空值不参与计算。
返回组中的平均值。空值不参与计算。支持增量计算。

## COUNT

Expand All @@ -20,31 +20,31 @@ count(*)
count(col)
```

返回组中的项目数。空值不参与计算。
返回组中的项目数。空值不参与计算。支持增量计算。

## MAX

```text
max(col)
```

返回组中的最大值。空值不参与计算。
返回组中的最大值。空值不参与计算。支持增量计算。

## MIN

```text
min(col)
```

返回组中的最小值。空值不参与计算。
返回组中的最小值。空值不参与计算。支持增量计算。

## SUM

```text
sum(col)
```

返回组中所有值的总和。空值不参与计算。
返回组中所有值的总和。空值不参与计算。支持增量计算。

## COLLECT

Expand All @@ -53,7 +53,7 @@ collect(*)
collect(col)
```

返回组中指定的列或整个消息(参数为*时)的值组成的数组。
返回组中指定的列或整个消息(参数为*时)的值组成的数组。支持增量计算。

### 示例

Expand Down Expand Up @@ -82,7 +82,7 @@ last_value(*, true)
last_value(col, false)
```

用于返回在组中指定列或整个消息中最后一行的值。该函数有两个参数,第一个参数用于指定列或整个消息,第二个参数用于指定是否需要忽略空值;如果第二个参数为 true,则该函数仅返回最后的非空值,如果没有非空值,则返回空值;如果第二个参数为 false,则函数将返回最后的值,无论它是否为空。
用于返回在组中指定列或整个消息中最后一行的值。该函数有两个参数,第一个参数用于指定列或整个消息,第二个参数用于指定是否需要忽略空值;如果第二个参数为 true,则该函数仅返回最后的非空值,如果没有非空值,则返回空值;如果第二个参数为 false,则函数将返回最后的值,无论它是否为空。支持增量计算。

## MERGE_AGG

Expand All @@ -93,7 +93,7 @@ merge_agg(col)

将组中的值合并为单个值。若存在重复键时取较后对象的值。它不进行递归操作;只合并顶级键值。

如果参数是列,结果将是一个包含列中所有对象的键的联合的对象。如果列只包含非对象值,则结果将是一个空对象。
如果参数是列,结果将是一个包含列中所有对象的键的联合的对象。如果列只包含非对象值,则结果将是一个空对象。支持增量计算。

### 示例

Expand Down

0 comments on commit 469b800

Please sign in to comment.