round
A decimal at option scale (default 0) with option mode (default half_to_even).
Flags
| Flag | Value |
|---|---|
| Kind | scalar |
| Nulls | a null argument gives null |
| Deterministic | yes |
| Order matters | no |
| Decomposable | no |
Example
A pipeline from the language's tested corpus that uses round, over the example tables.
from orders
derive {per = div(amount, 3, scale: 4, mode: "floor"), r = round(amount, scale: 1, mode: "half_away_from_zero")}In a plan:
{
"args": [
{
"col": 2
}
],
"fn": "round",
"options": {
"mode": "half_away_from_zero",
"scale": 1
}
}