2018-01-19 18:47:17 +00:00
|
|
|
select arrayResize([1, 2, 3], 10);
|
|
|
|
select arrayResize([1, 2, 3], -10);
|
|
|
|
select arrayResize([1, Null, 3], 10);
|
|
|
|
select arrayResize([1, Null, 3], -10);
|
|
|
|
select arrayResize([1, 2, 3, 4, 5, 6], 3);
|
|
|
|
select arrayResize([1, 2, 3, 4, 5, 6], -3);
|
|
|
|
select arrayResize([1, 2, 3], 5, 42);
|
|
|
|
select arrayResize([1, 2, 3], -5, 42);
|
|
|
|
select arrayResize(['a', 'b', 'c'], 5);
|
|
|
|
select arrayResize([[1, 2], [3, 4]], 4);
|
|
|
|
select arrayResize([[1, 2], [3, 4]], -4);
|
|
|
|
select arrayResize([[1, 2], [3, 4]], 4, [5, 6]);
|
|
|
|
select arrayResize([[1, 2], [3, 4]], -4, [5, 6]);
|
|
|
|
|
2018-06-04 19:37:58 +00:00
|
|
|
-- different types of array elements and default value to fill
|
|
|
|
select arrayResize([1, 2, 3], 5, 423.56);
|