> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Array functions

> BigQuery array functions and array handling in BigQuery compatibility mode.

<span className="feature-tag">Preview</span>

BigQuery [array functions](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions) in [BigQuery compatibility mode](/reference-sql/bigquery/overview). See also the Firebolt [Arrays guide](/guides/sql-dialect/arrays).

| Function | Support | Notes |
| :- | :- | :- |
| [`ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array) | Supported | Array subquery and constructor. |
| [`UNNEST`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) | Supported | Table-valued. Expands an array to rows, including `WITH OFFSET AS alias`. |
| [`ARRAY_CONCAT`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_concat) | Supported | |
| [`ARRAY_LENGTH`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_length) | Supported | |
| [`ARRAY_FIRST`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_first) | Supported | |
| [`ARRAY_FIRST_N`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_first_n) | Supported | Returns the first `n` elements. A `NULL` array or `NULL` `n` yields `NULL`. |
| [`ARRAY_REVERSE`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_reverse) | Supported | |
| [`ARRAY_TO_STRING`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_to_string) | Supported | |
| [`ARRAY_FIND`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_find) | Supported | Matches a target value or a lambda predicate. |
| [`ARRAY_OFFSET`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_offset) | Supported | Returns the 0-based offset of the first match (value or lambda predicate). |
| [`ARRAY_INCLUDES`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_includes) | Supported | Membership test against a value or lambda predicate. |
| [`ARRAY_INCLUDES_ANY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_includes_any) | Supported | True when any element of the search array is present. |
| [`ARRAY_INCLUDES_ALL`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_includes_all) | Supported | True when every element of the search array is present. |
| [`ARRAY_SLICE`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_slice) | With limitations | Firebolt indexes by offset and length, whereas BigQuery uses start and end positions, so results differ. |
| [`GENERATE_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_array) | Supported | |
| [`GENERATE_DATE_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_date_array) | With limitations | Step must be a whole number of days. |
| [`ARRAY_LAST`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_last) | Not supported | |
| [`GENERATE_TIMESTAMP_ARRAY`](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_timestamp_array) | Not supported | |

## Array construction and access

| Construct | Notes |
| :- | :- |
| `[e1, e2, ...]` | Array literal. |
| `ARRAY<T>[e1, e2, ...]` | Typed array literal. |
| `array[OFFSET(n)]`, `array[ORDINAL(n)]` | Element access, 0-based and 1-based. |

BigQuery arrays cannot contain `NULL` elements. Firebolt allows them, so a `NULL` element does not raise the error BigQuery would. See [Data types](/reference-sql/bigquery/data-types).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.