---
updatedAt: 2025-12-05T18:41:41.000Z
agentTools:
  projectIndex: https://docs.observeinc.com/llms.txt
---

# arrays_overlap

```
arrays_overlap(input_array_1: array, input_array_2: array) -> bool
```

Compares whether two arrays have at least one element in common.

Returns true if there is at least one element in common; otherwise 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()` will return true.

# Domain

This is a scalar function (calculates a single output value for a single input row).

# Categories

* [Boolean](function#boolean-functions)
* [Semistructured](function#semistructured-functions)

# Examples

<OpalCodeBlock code={
`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.

<OpalCodeBlock code={
`filter arrays_overlap(names, places)
`}/>

Filter to include all rows whose `names` column (an array) overlaps with the `places` column (another array).

<OpalCodeBlock code={
`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.