跳转至

Uniform random number(均匀随机数)

Supported in: Batch, Faster, Streaming

Returns a column of uniform random numbers drawn between 0 and 1. This is not deterministic and will not produce the same result on repeated builds, even when using a seed.

Expression categories: Numeric

Declared arguments

  • optional Seed: Adding a seed means that the random numbers will be generated from same sequence at each build. If you want true random numbers this should not be supplied. A seed will not produce fully deterministic results since compute may run distributed and the order in which random numbers are pulled for rows is not guaranteed.
    Literal\

Output type: Double


中文翻译

均匀随机数

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

返回一个介于0到1之间的均匀随机数列。该函数不具有确定性,即使使用种子(seed),在重复构建时也不会产生相同的结果。

表达式类别: 数值(Numeric)

声明的参数

  • 可选 种子(Seed): 添加种子意味着每次构建时随机数将从相同的序列中生成。如果需要真正的随机数,则不应提供此参数。种子无法产生完全确定性的结果,因为计算可能以分布式方式运行,且各行获取随机数的顺序无法保证。
    字面量\<Long>

输出类型: Double