toIntArray
Cast an array column to integer array type.
Usage Details
select *, toIntArray(column) as intArrayColumn from tableName
Input Parameters:
column
: An array column
Output:
A column intArrayColumn
which is same as column
but each element in each row casted to integer data type.
Example
Input Table: input_table
column |
---|
WrappedArray("3.45", "15") |
WrappedArray("178.90", "-45.78") |
select *, toIntArray(column) as intArrayColumn from input_table
Ouput:
column | intArrayColumn |
---|---|
WrappedArray("3.45", "15") | WrappedArray(3, 15) |
WrappedArray("178.90", "-45.78") | WrappedArray(178, -45) |
Updated about 1 year ago