ClickHouse/tests/queries/0_stateless/00557_array_resize.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

17 lines
640 B
SQL

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]);
-- different types of array elements and default value to fill
select arrayResize([1, 2, 3], 5, 423.56);