跳转至

Array union(数组并集(Array union))

Supported in: Batch, Faster, Streaming

Removes duplicates and unions a list of arrays.

Expression categories: Array

Declared arguments

  • Expressions: A list of arrays to union.
    List\>>

Type variable bounds: T accepts AnyType

Output type: Array\

Examples

Example 1: Base case

Argument values:

  • Expressions: [[ 1, 2, 3 ], [ 3, 4 ]]

Output: [ 1, 2, 3, 4 ]


Example 2: Base case

Argument values:

  • Expressions: [[ 1, 2, 3 ], [ 3, 4 ], [ 4, 5 ]]

Output: [ 1, 2, 3, 4, 5 ]


Example 3: Base case

Description: Duplicates are removed.

Argument values:

  • Expressions: [[ 1, 1 ], [ 1 ]]

Output: [ 1 ]


Example 4: Null case

Argument values:

  • Expressions: [first_array, second_array]
first_array second_array Output
[ 1, 2, 3 ] null [ 1, 2, 3 ]
null null [ ]


中文翻译


数组并集(Array union)

支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)

对多个数组进行去重并合并。

表达式类别: 数组(Array)

声明的参数

  • 表达式(Expressions): 需要合并的数组列表。
    List\>>

类型变量边界: T 接受任意类型(AnyType)

输出类型: Array\

示例

示例 1:基础情况

参数值:

  • 表达式: [[ 1, 2, 3 ], [ 3, 4 ]]

输出: [ 1, 2, 3, 4 ]


示例 2:基础情况

参数值:

  • 表达式: [[ 1, 2, 3 ], [ 3, 4 ], [ 4, 5 ]]

输出: [ 1, 2, 3, 4, 5 ]


示例 3:基础情况

说明: 重复项会被移除。

参数值:

  • 表达式: [[ 1, 1 ], [ 1 ]]

输出: [ 1 ]


示例 4:空值情况

参数值:

  • 表达式: [first_array, second_array]
first_array second_array 输出
[ 1, 2, 3 ] null [ 1, 2, 3 ]
null null [ ]