make_array_range

Description

Returns an array that contains a list of consecutive integers ranging from start to end. Note the end is not included in the list and the largest element is end - 1. The size of the generated list is capped at 1000000.

Return type

array

Domain

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

Categories

Usage

make_array_range(start, end)

Argument

Type

Optional

Repeatable

Restrictions

start

int64

no

no

none

end

int64

no

no

none

Examples

make_col arr:make_array_range(2, 5)

Make a new column ‘arr’ containing [2, 3, 4].

make_col arr:make_array_range(10, 5)

make_array_range would return an empty array if end is less or equal to start, so this will create a new column ‘arr’ containing an empty array.