Hive - Function

1 - About

3 - Type

4 - Management

4.1 - List

SHOW FUNCTIONS;
+-------------------------+--+
|        tab_name         |
+-------------------------+--+
| !                       |
| !=                      |
| %                       |
| &                       |
| *                       |
| +                       |
| -                       |
| /                       |
| <                       |
| <=                      |
| <=>                     |
| <>                      |
| =                       |
| ==                      |
| >                       |
| >=                      |
| ^                       |
| abs                     |
| acos                    |
| add_months              |
| aes_decrypt             |
| aes_encrypt             |

4.2 - Describe

DESCRIBE FUNCTION <function_name>;
DESCRIBE FUNCTION EXTENDED <function_name>;

Example:

DESCRIBE FUNCTION CURRENT_USER;
+---------------------------------------------+--+
|                  tab_name                   |
+---------------------------------------------+--+
| current_user() - Returns current user name  |
+---------------------------------------------+--+

Example:

 SELECT MAX(CURRENT_USER()) FROM littleTable;
+-------+--+
|  _c0  |
+-------+--+
| nico  |
+-------+--+

5 - Documentation / Reference

db/hive/function.txt ยท Last modified: 2018/05/28 17:33 by gerardnico