ifNotFinite
This section contains reference documentation for the ifNotFinite function.
Last updated
Was this helpful?
This section contains reference documentation for the ifNotFinite function.
Returns the input value if it is finite, otherwise returns the specified default value. Useful for replacing infinite or NaN values with a fallback.
ifNotFinite(valueToCheck, defaultValue)
valueToCheck
DOUBLE
Value to check for finiteness
defaultValue
DOUBLE
Value to return if valueToCheck is not finite
Returns: DOUBLE
SELECT ifNotFinite(ratio, 0) AS value
FROM myTableReturns ratio if it is finite, otherwise returns 0.
SELECT ifNotFinite(1.0 / 0.0, -1) AS value
FROM myTable-1.0
SELECT ifNotFinite(42.5, -1) AS value
FROM myTable42.5
Last updated
Was this helpful?
Was this helpful?

