Array distinct(数组去重(Array distinct))¶
Supported in: Batch, Faster, Streaming
Removes duplicates and returns distinct values from the array.
Expression categories: Array
Declared arguments¶
- Expression: Input array from which to remove duplicates.
Expression\>
Type variable bounds: T accepts ComparableType
Output type: Array\
Examples¶
Example 1: Base case¶
Argument values:
- Expression: [ 1, 1, 2, 3 ]
Output: [ 1, 2, 3 ]
Example 2: Null case¶
Argument values:
- Expression:
array
| array | Output |
|---|---|
| null | null |
中文翻译¶
数组去重(Array distinct)¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
从数组中移除重复项并返回唯一值。
表达式类别: 数组
声明的参数¶
- 表达式(Expression): 需要去重的输入数组。
表达式\<数组\>
类型变量约束: T 接受 ComparableType
输出类型: 数组\
示例¶
示例 1:基础情况¶
参数值:
- 表达式: [ 1, 1, 2, 3 ]
输出: [ 1, 2, 3 ]
示例 2:空值情况¶
参数值:
- 表达式:
array
| array | 输出 |
|---|---|
| null | null |