toDoubleArray
Cast an array column to double array type.
Usage Details
select *, toDoubleArray(column) as doubleArrayColumn from tableName
Input Parameters:
column: An array column
Output:
A column doubleArrayColumn which is same as column but each element in each row casted to double data type.
Example
Input Table: input_table
| column |
|---|
| WrappedArray("3.45", "15") |
| WrappedArray("178.90", "-45.78") |
select *, toDoubleArray(column) as doubleArrayColumn from input_table
Ouput:
| column | doubleArrayColumn |
|---|---|
| WrappedArray("3.45", "15") | WrappedArray(3.45, 15) |
| WrappedArray("178.90", "-45.78") | WrappedArray(178.90, -45.78) |
Updated about 2 years ago