

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# ARRAYS\$1OVERLAP function
<a name="arrays_overlap"></a>

Checks whether two arrays have any common elements. Returns TRUE if the arrays share at least one element, or FALSE if no common elements exist. The function is NULL-safe, meaning it treats NULLs are treated as known objects.

## Syntax
<a name="arrays_overlap-syntax"></a>

```
ARRAYS_OVERLAP( array1, array2 )
```

## Arguments
<a name="arrays_overlap-arguments"></a>

 *array1*   
A SUPER expression that specifies an array.

 *array2*   
A SUPER expression that specifies an array.

## Return type
<a name="arrays_overlap-return-type"></a>

The ARRAYS\$1OVERLAP function returns a Boolean type.

## Example
<a name="arrays_overlap-example"></a>

The following examples show the ARRAYS\$1OVERLAP function.

```
SELECT ARRAYS_OVERLAP(ARRAY('blue', 'green'), ARRAY('red', 'green'));
 arrays_overlap 
----------------
 t
(1 row)
```

The following examples show that NULLs are treated as valid elements.

```
SELECT ARRAYS_OVERLAP(ARRAY('red', NULL, 'blue'), ARRAY('green', NULL));
 arrays_overlap 
----------------
 t
(1 row)

SELECT ARRAYS_OVERLAP(ARRAY('red', NULL, 'blue'), ARRAY('green'));
 arrays_overlap 
----------------
 f
(1 row)

SELECT ARRAYS_OVERLAP(JSON_PARSE('[null]'), ARRAY(NULL));
 arrays_overlap 
----------------
 t
(1 row)
```

## See also
<a name="arrays_overlap-see-also"></a>
+ [ARRAY\$1INTERSECTION function](array_intersection.md)
+ [ARRAY\$1CONTAINS function](array_contains.md)
+ [ARRAY\$1EXCEPT function](array_except.md)