Sum(求和(Sum))¶
Supported in: Batch, Faster, Streaming
Sums the specified expression.
Expression categories: Numeric
Declared arguments¶
- Expression: The column to be summed.
Expression\
Output type: Decimal | Double | Long
Examples¶
Example 1: Base case¶
Argument values:
- Expression:
values
Given input table:
| values |
|---|
| 2 |
| 4 |
| 3 |
Outputs: 9
Example 2: Null case¶
Argument values:
- Expression:
values
Given input table:
| values |
|---|
| 2 |
| null |
| 3 |
Outputs: 5
Example 3: Edge case¶
Argument values:
- Expression:
values
Given input table:
| values |
|---|
| 1.111111111111 |
| 1.111111111111 |
Outputs: 2.222222222222
中文翻译¶
求和(Sum)¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
对指定表达式进行求和。
表达式类别: 数值型(Numeric)
声明的参数¶
- 表达式(Expression): 需要求和的列。
表达式\<数值型>
输出类型: 十进制数(Decimal)| 双精度浮点数(Double)| 长整型(Long)
示例¶
示例 1:基础情况¶
参数值:
- 表达式:
values
输入表:
| values |
|---|
| 2 |
| 4 |
| 3 |
输出结果: 9
示例 2:空值情况¶
参数值:
- 表达式:
values
输入表:
| values |
|---|
| 2 |
| null |
| 3 |
输出结果: 5
示例 3:边界情况¶
参数值:
- 表达式:
values
输入表:
| values |
|---|
| 1.111111111111 |
| 1.111111111111 |
输出结果: 2.222222222222