toArray
Syntax
toArray(X)
Arguments
X is a column name or an expression on column(s).
Details
Use with GROUP BY to aggregate grouped data into an array vector.
Examples
t = table(1 1 3 4 as id, 1 3 5 6 as v1)
new_t = select toArray(v1) as newV1 from t group by id
/*
id newV1
-- -----
1 [1,3]
3 [5]
4 [6]
*/
new_t = select toArray(v1+1) as newV1 from t group by id
/*
id newV1
-- -----
1 [2,4]
3 [6]
4 [7]
*/