# arraysOverlap

Returns `true` when two arrays of the same element type share at least one value.

## Signature

> ARRAYS\_OVERLAP(array1, array2)

Pinot also accepts `ARRAYSOVERLAP`.

## Supported Types

| Array Type      | Return Type |
| --------------- | ----------- |
| `INT[]`         | `BOOLEAN`   |
| `LONG[]`        | `BOOLEAN`   |
| `FLOAT[]`       | `BOOLEAN`   |
| `DOUBLE[]`      | `BOOLEAN`   |
| `BIG_DECIMAL[]` | `BOOLEAN`   |
| `STRING[]`      | `BOOLEAN`   |
| `BYTES[]`       | `BOOLEAN`   |

Both arguments must have the same array type.

## Usage Examples

These examples are derived from Pinot's integration tests.

```sql
SELECT ARRAYS_OVERLAP(ARRAY[1, 2], ARRAY[3, 2]) AS hasOverlap
```

Returns `true`.

```sql
SELECT ARRAYS_OVERLAP(ARRAY['a', 'b'], ARRAY['x', 'y']) AS hasOverlap
```

Returns `false`.

```sql
SELECT COUNT(*)
FROM myTable
WHERE ARRAYS_OVERLAP(longArrayCol, ARRAY[CAST(2 AS BIGINT), CAST(10 AS BIGINT)])
```

Returns all rows where `longArrayCol` shares at least one value with the filter array.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pinot.apache.org/functions/array/arraysoverlap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
