For the complete documentation index, see llms.txt. This page is also available as Markdown.

arrayPushBack

This section contains reference documentation for the arrayPushBack functions.

Appends one element to the end of an array.

Supported Variants

Function
Signature
Return Type

arrayPushBackInt

arrayPushBackInt(values, element)

INT[]

arrayPushBackLong

arrayPushBackLong(values, element)

LONG[]

arrayPushBackFloat

arrayPushBackFloat(values, element)

FLOAT[]

arrayPushBackDouble

arrayPushBackDouble(values, element)

DOUBLE[]

arrayPushBackString

arrayPushBackString(values, element)

STRING[]

Usage Examples

These examples are based on the inputs used in Pinot's array function tests.

SELECT arrayPushBackInt(intArray, 7) AS updatedArray
FROM myTable

Returns [3, 2, 10, 6, 1, 12, 7] when intArray is [3, 2, 10, 6, 1, 12].

SELECT arrayPushBackString(stringArray, 'x') AS updatedArray
FROM myTable

Returns ['3', '2', '10', '6', '1', '12', 'x'] when stringArray is ['3', '2', '10', '6', '1', '12'].

Last updated

Was this helpful?