+-------------+| res |+-------------+| [1,1,1,1,1] |+-------------+
示例二
select array_repeat([1,2],3) as res;
+-------------------+| res |+-------------------+| [[1,2],[1,2],[1,2]] |+-------------------+
示例三
select array_repeat(1,-1) as res;
+------+| res |+------+| [] |+------+
示例四
select array_repeat(null,3) as res;
+------+| res |+------+| NULL |+------+
示例五
CREATE TABLE IF NOT EXISTS test (COLA INT, COLB INT) PROPERTIES ("replication_num"="1");INSERT INTO test (COLA, COLB) VALUES (1, 3), (NULL, 3), (2, NULL);select array_repeat(COLA,COLB) from test;