rem

Int64 remainder of div_trunc (the sign of a).

ScalarDeterministic

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 rem, over the example tables.

Hint
from orders
filter qty <= 9
derive {total = amount * 2, plus = qty + 1, net = amount - 1.50, cents = qty % 3, neg = -qty, absq = abs(qty)}

In a plan:

JSON
{
  "args": [
    {
      "col": 3
    },
    {
      "lit": 3,
      "type": {
        "kind": "int64"
      }
    }
  ],
  "fn": "rem"
}