Release Notes November 22, 2023¶
No new features for Observe instances.
OPAL Language Updates¶
arrays_overlap
¶
Type of operation: Filter
Description¶
Compares if two arrays have at least one element in common. Returns true if there is at least one element in common. Otherwise, OPAL returns false.
The function is NULL-safe, meaning if both arrays contain a null element, it is considered to be an overlapping element and arrays_overlap()
returns true.
Return type¶
boolean
Domain¶
This is a scalar function and calculates a single output value for a single input row.
Usage¶
arrays_overlap( input_array_1, input_array_2 )
Argument |
Type |
Required |
Multiple |
Constant |
---|---|---|---|---|
input_array_1 |
array |
Required |
Only one |
Variable |
input_array_2 |
array |
Required |
Only one |
Variable |
Examples¶
make_col foo:arrays_overlap(make_array('hello', 'goodbye'), make_array('katze', 'hund'))
Make the column ‘foo’ with a False
as the input arrays have no overlap.
filter arrays_overlap(names, places)
Filter to include all rows whose names
column (an array) overlaps with the places
column (another array).
make_col foo:arrays_overlap(make_array('hello', variant_null()), make_array('katze', variant_null()))
Make the column ‘foo’ with a True
as the input arrays overlap on the null
value.