サポート対象:バッチ、高速、ストリーミング
Splits the range from the minimum to the maximum value into a number of equal-width buckets and returns the 1-based bucket a value falls in. Returns 0 for a value before the range and the number of buckets plus one for a value after it. If the minimum is greater than the maximum, the buckets are numbered from the minimum down. Returns null if the number of buckets is not positive or is the maximum long, if the bounds are equal or not finite, or if the value is not a number.
式のカテゴリー: 数値
出力タイプ: Long
説明: The second value is before the range and the third after it. The fourth range runs down from its minimum.
引数の値:
valuemaxminbuckets| value | min | max | buckets | 出力 |
|---|---|---|---|---|
| 5.3 | 0.2 | 10.6 | 5 | 3 |
| -2.1 | 1.3 | 3.4 | 3 | 0 |
| 8.1 | 0.0 | 5.7 | 4 | 5 |
| 4.0 | 10.0 | 0.0 | 5 | 4 |
引数の値:
valuemaxminbuckets| value | min | max | buckets | 出力 |
|---|---|---|---|---|
| null | 0.0 | 10.0 | 5 | null |
| 5.0 | null | 10.0 | 5 | null |
| 5.0 | 0.0 | null | 5 | null |
| 5.0 | 0.0 | 10.0 | null | null |