跳转至

Array concat(数组拼接(Array concat))

Supported in: Batch, Faster, Streaming

Concatenates the provided arrays into a single array, without de-duplication.

Expression categories: Array

Declared arguments

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

Type variable bounds: T accepts AnyType

Output type: Array\

Examples

Example 1: Base case

Argument values:

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

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


Example 2: Base case

Argument values:

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

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


Example 3: Base case

Argument values:

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

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


Example 4: Null case

Argument values:

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


中文翻译


数组拼接(Array concat)

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

将提供的多个数组合并为一个数组,不进行去重操作。

表达式类别: 数组(Array)

声明的参数

  • 表达式(Expressions): 待拼接的数组列表。
    List\>>

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

输出类型: Array\

示例

示例 1:基础情况

参数值:

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

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


示例 2:基础情况

参数值:

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

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


示例 3:基础情况

参数值:

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

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


示例 4:空值情况

参数值:

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