> For the complete documentation index, see [llms.txt](https://docs.pinot.apache.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pinot.apache.org/functions/array/arraypushfront.md).
# arrayPushFront
Prepends one element to the beginning of an array.
## Supported Variants
| Function | Signature | Return Type |
| ---------------------- | --------------------------------------- | ----------- |
| `arrayPushFrontInt` | `arrayPushFrontInt(values, element)` | `INT[]` |
| `arrayPushFrontLong` | `arrayPushFrontLong(values, element)` | `LONG[]` |
| `arrayPushFrontFloat` | `arrayPushFrontFloat(values, element)` | `FLOAT[]` |
| `arrayPushFrontDouble` | `arrayPushFrontDouble(values, element)` | `DOUBLE[]` |
| `arrayPushFrontString` | `arrayPushFrontString(values, element)` | `STRING[]` |
## Usage Examples
These examples are based on the inputs used in Pinot's array function tests.
```sql
SELECT arrayPushFrontInt(intArray, 7) AS updatedArray
FROM myTable
```
Returns `[7, 3, 2, 10, 6, 1, 12]` when `intArray` is `[3, 2, 10, 6, 1, 12]`.
```sql
SELECT arrayPushFrontString(stringArray, 'x') AS updatedArray
FROM myTable
```
Returns `['x', '3', '2', '10', '6', '1', '12']` when `stringArray` is `['3', '2', '10', '6', '1', '12']`.
---
# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.
## 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, and the optional `goal` query parameter:
```
GET https://docs.pinot.apache.org/functions/array/arraypushfront.md?ask=