toLongArray

Cast an array column to long array type.

Usage Details

select *, toLongArray(column) as longArrayColumn from tableName

Input Parameters:
column: An array column

Output:
A column longArrayColumn which is same as column but each element in each row casted to long data type.

Example

Input Table: input_table

column
WrappedArray("3.45", "15")
WrappedArray("178.90", "-45.78")
select *, toLongArray(column) as longArrayColumn from input_table

Ouput:

columnlongArrayColumn
WrappedArray("3.45", "15")WrappedArray(3, 15)
WrappedArray("178.90", "-45.78")WrappedArray(178, -45)

© Devo Technology Inc. All Rights Reserved.