bigfunctions > find_value
find_value¶
Signature
find_value(arr, value)
Description
Return the first offset
(zero-based index) of value
in array arr
(or null
if value
is not in arr
).
Examples
1. When value
is in array
select bigfunctions.eu.find_value([3, 4], 4)
select bigfunctions.us.find_value([3, 4], 4)
select bigfunctions.europe_west1.find_value([3, 4], 4)
+--------+
| offset |
+--------+
| 1 |
+--------+
2. When value
is not in array
select bigfunctions.eu.find_value([3, 4], 7)
select bigfunctions.us.find_value([3, 4], 7)
select bigfunctions.europe_west1.find_value([3, 4], 7)
+--------+
| offset |
+--------+
| null |
+--------+