Using built-in functions
There are various built-in functions available in Hive that can be used in queries for executing various operations. These functions are used to extract or manipulate data in Hive tables.
Built-in functions are divided into the following categories:
Mathematical functions
Collection functions
Type conversion functions
Date functions
String functions
Conditional functions
Miscellaneous functions
How to do it…
In the following sections, a few built-in functions are explained.
Mathematical functions
Hive supports various functions to run some mathematical operations on field values. There are a large number of mathematical functions available in Hive that can be used in queries. Most of the mathematical functions are the same as supported in RDBMS:
Function Name |
Return Type |
Description |
---|---|---|
|
DOUBLE |
It will return an absolute value of |
|
DOUBLE |
It will return an arc cosine value of |