Skip to content

Commit d2690b8

Browse files
authored
docs: add inc agg function doc (#3493)
Signed-off-by: Song Gao <disxiaofei@163.com>
1 parent d10d486 commit d2690b8

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

docs/en_US/sqls/functions/aggregate_functions.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ as expressions only in the following:
1212
avg(col)
1313
```
1414

15-
The average of the values in a group. The null values will be ignored.
15+
The average of the values in a group. The null values will be ignored. Supports incremental calculations.
1616

1717
## COUNT
1818

@@ -21,31 +21,31 @@ count(*)
2121
count(col)
2222
```
2323

24-
The number of items in a group. The null values will be ignored.
24+
The number of items in a group. The null values will be ignored. Supports incremental calculations.
2525

2626
## MAX
2727

2828
```text
2929
max(col)
3030
```
3131

32-
The maximum value in a group. The null values will be ignored.
32+
The maximum value in a group. The null values will be ignored. Supports incremental calculations.
3333

3434
## MIN
3535

3636
```text
3737
min(col)
3838
```
3939

40-
The minimum value in a group. The null values will be ignored.
40+
The minimum value in a group. The null values will be ignored. Supports incremental calculations.
4141

4242
## SUM
4343

4444
```text
4545
sum(col)
4646
```
4747

48-
The sum of all the values in a group. The null values will be ignored.
48+
The sum of all the values in a group. The null values will be ignored. Supports incremental calculations.
4949

5050
## COLLECT
5151

@@ -54,7 +54,7 @@ collect(*)
5454
collect(col)
5555
```
5656

57-
Returns an array with all columns or the whole record (when the parameter is *) values from the group.
57+
Returns an array with all columns or the whole record (when the parameter is *) values from the group. Supports incremental calculations.
5858

5959
### Examples
6060

@@ -85,7 +85,7 @@ last_value(*, true)
8585
last_value(col, false)
8686
```
8787
88-
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.
88+
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.
8989
9090
## MERGE_AGG
9191
@@ -94,6 +94,7 @@ merge_agg(*)
9494
merge_agg(col)
9595
```
9696
97+
Supports incremental calculations.
9798
Concatenate values from the group into a single value.
9899
It concatenates multiple objects by generating an object containing the union of their keys,
99100
taking the second object's value when there are duplicate keys.

docs/zh_CN/sqls/functions/aggregate_functions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
avg(col)
1212
```
1313

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

1616
## COUNT
1717

@@ -20,31 +20,31 @@ count(*)
2020
count(col)
2121
```
2222

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

2525
## MAX
2626

2727
```text
2828
max(col)
2929
```
3030

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

3333
## MIN
3434

3535
```text
3636
min(col)
3737
```
3838

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

4141
## SUM
4242

4343
```text
4444
sum(col)
4545
```
4646

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

4949
## COLLECT
5050

@@ -53,7 +53,7 @@ collect(*)
5353
collect(col)
5454
```
5555

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

5858
### 示例
5959

@@ -82,7 +82,7 @@ last_value(*, true)
8282
last_value(col, false)
8383
```
8484

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

8787
## MERGE_AGG
8888

@@ -93,7 +93,7 @@ merge_agg(col)
9393

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

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

9898
### 示例
9999

0 commit comments

Comments
 (0)