make_array_range
make_array_range(start: int64, end: int64) -> array of int64
Builds an array<int64> of consecutive integers starting at start (inclusive) and ending before end (exclusive), stepping by 1.
If end is less than or equal to start, the result is an empty array. To cap memory and execution cost, the compiler bounds the effective upper end at start + 1000000; requested end values beyond that are truncated to that bound before range generation.
This is a scalar function, not an aggregate; for collecting values across rows use array_agg.
Domain
This is a scalar function (calculates a single output value for a single input row).
Categories
Examples
make_col idx:make_array_range(0, 5)
Produces [0,1,2,3,4] as an int64 array for fan-out or bucketing helpers.
make_col idx:make_array_range(10, 20)
Generates ten consecutive integers starting at 10 and stopping before 20 for synthetic keys.
Updated 20 days ago