聚合操作 | 表达式 | 含义 | 例子 | 支持流式 Group窗口 |
支持流式 Over开窗 |
支持批式 Group窗口 |
支持批式 Over开窗 |
---|---|---|---|---|---|---|---|
COUNT | COUNT([ALL | DISTINCT] col) | 计算窗口内数据条数 | COUNT(value) AS result | - [x] |
|
- [x]
|
- [x]
|
- [x]
|
| COUNT_PRECEDING | COUNT_PRECEDING([ALL | DISTINCT] col) | 计算窗口内数据条数(不包括当前值) | COUNT_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| SUM | SUM([ALL | DISTINCT] col) | 计算窗口内指定列的和 | SUM(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| SUM_PRECEDING | SUM_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的和(不包括当前值) | SUM_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| AVG | AVG([ALL | DISTINCT] col) | 计算窗口内指定列的均值 | AVG(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| AVG_PRECEDING | AVG_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的均值(不包括当前值) | AVG_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| MIN | MIN([ALL | DISTINCT] col) | 计算窗口内指定列的最小值 | MIN(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| MIN_PRECEDING | MIN_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的最小值(不包括当前值) | MIN_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| MAX | MAX([ALL | DISTINCT] col) | 计算窗口内指定列的最大值 | MAX(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| MAX_PRECEDING | MAX_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的最大值(不包括当前值) | MAX_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| STDDEV_SAMP | STDDEV_SAMP([ALL | DISTINCT] col) | 计算窗口内指定列的样本标准差 | STDDEV_SAMP(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| STDDEV_SAMP_PRECEDING | STDDEV_SAMP_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的样本标准差(不包括当前值) | STDDEV_SAMP_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| STDDEV_POP | STDDEV_POP([ALL | DISTINCT] col) | 计算窗口内指定列的总体标准差 | STDDEV_POP(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| STDDEV_POP_PRECEDING | STDDEV_POP_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的总体标准差(不包括当前值) | STDDEV_POP_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| VAR_SAMP | VAR_SAMP([ALL | DISTINCT] col) | 计算窗口内指定列的样本方差 | VAR_SAMP(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| VAR_SAMP_PRECEDING | VAR_SAMP_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的样本方差(不包括当前值) | VAR_SAMP_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| VAR_POP | VAR_POP([ALL | DISTINCT] col) | 计算窗口内指定列的总体方差 | VAR_POP(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| VAR_POP_PRECEDING | VAR_POP_PRECEDING([ALL | DISTINCT] col) | 计算窗口内指定列的总体方差(不包括当前值) | VAR_POP_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| SKEWNESS | SKEWNESS(col) | 计算窗口内指定列的偏度 | SKEWNESS(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| SKEWNESS_PRECEDING | SKEWNESS_PRECEDING(col) | 计算窗口内指定列的偏度不包括当前值) | SKEWNESS_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| SUM_LAST | SUM_LAST(col [, k]) | 返回窗口内最近k个值的和 | SUM_LAST(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| SQUARE_SUM | SQUARE_SUM(col) | 返回窗口内的平方和 | SQUARE_SUM(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| SQUARE_SUM_PRECEDING | SQUARE_SUM_PRECEDING(col) | 返回窗口内的平方和(不包括当前值) | SQUARE_SUM_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| MEDIAN | MEDIAN(col) | 返回窗口内的中位数 | MEDIAN(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| MEDIAN_PRECEDING | MEDIAN_PRECEDING(col) | 返回窗口内的中位数(不包括当前值) | MEDIAN_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| MODE | MODE(col) | 返回窗口内的众数 | MODE(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| MODE_PRECEDING | MODE_PRECEDING(col) | 返回窗口内的众数(不包括当前值) | MODE_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| FREQ | FREQ(col) | 返回当前数据在窗口内出现次数 | FREQ(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| FREQ_PRECEDING | FREQ_PRECEDING(col) | 返回当前数据在窗口内出现次数(不包括当前值) | FREQ_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| RANK | RANK() | 计算当前数据在窗口内的排名,生成序号不连续 | RANK(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| DENSE_RANK | DENSE_RANK() | 计算当前数据在窗口内的排名,生成序号连续 | DENSE_RANK(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| ROW_NUMBER | ROW_NUMBER() | 计算当前数据在窗口内的行号 | ROW_NUMBER()as result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| LAG | LAG(col [, offset] [, default]) | 计算当前值前offset个值,如果没有返回default | LAG(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| LAG_INCLUDING_NULL | LAG_INCLUDING_NULL(col [, offset] [, default]) | 计算当前值前offset个值,如果没有返回default | LAG_INCLUDING_NULL(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| LAST_DISTINCT | LAST_DISTINCT(col) | 返回窗口内上一个与当前值不同的值 | LAST_DISTINCT(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| LAST_TIME | LAST_TIME(col) | 返回窗口内上一个数据的时间 | LAST_TIME(col) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| LAST_VALUE | LAST_VALUE(col) | 返回窗口内上一条数据 | LAST_VALUE(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| IS_EXIST | IS_EXIST(col) | 返回当前数据是否在窗口内出现过 | IS_EXIST(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| CONCAT_AGG | CONCAT_AGG(col [, delimiter]) | 返回窗口内数据的拼接值 | CONCAT_AGG(value) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| CONCAT_AGG_PRECEDING | CONCAT_AGG_PRECEDING(col [, delimiter]) | 返回窗口内数据的拼接值(不包括当前值) | CONCAT_AGG_PRECEDING(value) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [x]
|
| MTABLE_AGG | MTABLE_AGG(col1, col2…) | 返回窗口内数据的聚合MTABLE | MTABLE_AGG(value1, value2, value3) AS result |
- [x]
|
- [x]
|
- [x]
|
- [x]
|
| MTABLE_AGG_PRECEDING | MTABLE_AGG_PRECEDING(col1, col2…) | 返回窗口内数据的聚合MTABLE (不包括当前值) | MTABLE_AGG_PRECEDING(value1, value2, value3) AS result |
- [ ]
|
- [x]
|
- [ ]
|
- [ ]
|
:::info 对应的窗口组件:
- 流式Group窗口组件:TumbleTimeWindowStreamOp, HopTimeWindowStreamOp, SessionTimeWindowStreamOp
- 流式Over开窗组件:OverCountWindowStreamOp, OverTimeWindowStreamOp
- 批式Group窗口组件:GroupByBatchOp
- 批式Over开窗组件:OverWindowBatchOp :::