Join array(连接数组(Join array))¶
Supported in: Batch, Faster, Streaming
Joins array with specified separator.
Expression categories: Array
Declared arguments¶
- Array to join: Array to join on.
Expression\> - Separator: Separator to join array with.
Expression\
Output type: String
Examples¶
Example 1: Base case¶
Argument values:
- Array to join: [ hello, world ]
- Separator: -
Output: hello-world
Example 2: Base case¶
Argument values:
- Array to join: [ hello, world ]
- Separator:
Output: hello
world
Example 3: Null case¶
Argument values:
- Array to join:
array - Separator:
separator
| array | separator | Output |
|---|---|---|
| [ hello, world ] | null | helloworld |
| null | - | null |
| null | null | null |
Example 4: Edge case¶
Argument values:
- Array to join: [ ]
- Separator: -
Output: empty string
中文翻译¶
连接数组(Join array)¶
支持:批处理(Batch)、快速处理(Faster)、流处理(Streaming)
使用指定的分隔符连接数组。
表达式类别: 数组(Array)
声明的参数¶
- 要连接的数组(Array to join): 用于连接的数组。
表达式\> - 分隔符(Separator): 用于连接数组的分隔符。
表达式\
输出类型: String
示例¶
示例 1:基本情况¶
参数值:
- 要连接的数组: [ hello, world ]
- 分隔符: -
输出: hello-world
示例 2:基本情况¶
参数值:
- 要连接的数组: [ hello, world ]
- 分隔符:
输出: hello
world
示例 3:空值情况¶
参数值:
- 要连接的数组:
array - 分隔符:
separator
| array | separator | 输出 |
|---|---|---|
| [ hello, world ] | null | helloworld |
| null | - | null |
| null | null | null |
示例 4:边界情况¶
参数值:
- 要连接的数组: [ ]
- 分隔符: -
输出: 空字符串(empty string)