cast

a as the type of option to, checked; option mode rounds (default half_to_even); option on_error is "error" (default) or "null".

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

Hint
from orders
filter approx_contains(customer, cast(status, to: binary))

In a plan:

JSON
{
  "args": [
    {
      "col": 7
    }
  ],
  "fn": "cast",
  "options": {
    "to": {
      "kind": "binary"
    }
  }
}