ifNull
Evaluates to the input value if the input value is not null. Otherwise, evaluates to the alternate value.
Used in the following format, where input and alternate may be any expression:
ifNull(input, alternate)
input.ifNull(alternate)
The return value type is the same as an input or alternate.
Examples
ifNull("", 3.5) # value: ""
"".ifNull(3.5) # value: ""
ifNull(null, list(1, 2)) # value: (list 1 2)
null.ifNull(list(1, 2)) # value: (list 1 2)
ifNull('field', $default) # common usage
'field'.ifNull($default) # common usage
isNotNull
Evaluates whether the expr parameter is not null.
Used in the following format, where expr may be any expression:
isNotNull(expr)
expr.isNotNull()
The return value type is a Boolean.
Examples
isNotNull(null) # value: false
null.isNotNull() # value: false
isNotNull("") # value: true
"".isNotNull() # value: true
isNull
Evaluates whether the expr parameter is null.
Used in the following format, where expr may be any expression:
isNull(expr)
expr.isNull()
The return value type is a Boolean.
Examples
isNull(null) # value: true
null.isNull() # value: true
isNull("") # value: false
"".isNull() # value: false