div_trunc
Int64 quotient rounded toward zero; DIVISION_BY_ZERO on 0.
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 div_trunc, over the example tables.
from orders
filter qty != 0
derive {t = div_trunc(id, qty), f = div_floor(id, qty)}In a plan:
{
"args": [
{
"col": 0
},
{
"col": 3
}
],
"fn": "div_trunc"
}