跳转至

Approximate median(近似中位数(Approximate median))

Supported in: Batch

Computes approximate median of values in the column.

Expression categories: Aggregate

Declared arguments

  • Expression: The column on which to compute the approximate median.
    Expression\

Output type: Numeric

Examples

Example 1: Base case

Argument values:

  • Expression: values

Given input table:

values
2
4
3

Outputs: 3


Example 2: Null case

Argument values:

  • Expression: values

Given input table:

values
2
3
4
null

Outputs: 3



中文翻译

近似中位数(Approximate median)

支持环境:批处理(Batch)

计算列中数值的近似中位数。

表达式类别: 聚合(Aggregate)

声明的参数

  • 表达式(Expression): 用于计算近似中位数的列。
    表达式\<数值类型>(Expression\)

输出类型: 数值类型(Numeric)

示例

示例1:基础案例

参数值:

  • 表达式(Expression): values

输入表:

values
2
4
3

输出结果: 3


示例2:空值案例

参数值:

  • 表达式(Expression): values

输入表:

values
2
3
4
null

输出结果: 3