Saturday 24 December 2022

Hive: type conversion functions

Below table summarizes the type conversion functions supported in Hive.

 

Function

Description

Example

binary(string|char|varchar|binary)

Cast the parameter into binary. Only string, char, varchar or binary data can be cast into binary data types.

 

cast(expr as <type>)

Convert the result of an expression to given type.

cast('23451' as BIGINT)

Previous                                                    Next                                                    Home

No comments:

Post a Comment