if_null

Aliases: ifnull (deprecated).

if_null(arg: storable, replacement: arg) -> arg

Return the second argument if the first argument has the null value. Arguments must have the same type.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

make_col foo:if_null(foo, 0)

Replace the value of column 'foo' with the value 0 if the value is null.