跳转至

Length(长度(Length))

Supported in: Batch, Faster, Streaming

Returns the length of each value in a string column or an array column.

Expression categories: Array, Numeric

Declared arguments

  • Expression: The expression to compute the length of.
    Expression\ | Binary | Map\\ | String>

Output type: Integer

Examples

Example 1: Base case

Argument values:

  • Expression: string
string Output
hello 5
bye 3


中文翻译

长度(Length)

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

返回字符串列或数组列中每个值的长度。

表达式类别: 数组(Array)、数值(Numeric)

声明的参数

  • 表达式(Expression): 要计算长度的表达式。
    表达式\<数组\<任意类型> | 二进制 | 映射\<任意类型, 任意类型> | 字符串>

输出类型: 整数(Integer)

示例

示例1:基础案例

参数值:

  • 表达式(Expression): string
string 输出(Output)
hello 5
bye 3