Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1010 Bytes

system.rst

File metadata and controls

31 lines (22 loc) · 1010 Bytes

System Functions

Table of contents

Description

Usage: typeof(expr) function returns name of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries.

Argument type: ANY

Return type: STRING

Example:

os> source=people | eval `typeof(date)` = typeof(DATE('2008-04-14')), `typeof(int)` = typeof(1), `typeof(now())` = typeof(now()), `typeof(column)` = typeof(accounts) | fields `typeof(date)`, `typeof(int)`, `typeof(now())`, `typeof(column)`
fetched rows / total rows = 1/1
+--------------+-------------+---------------+----------------+
| typeof(date) | typeof(int) | typeof(now()) | typeof(column) |
|--------------+-------------+---------------+----------------|
| DATE         | INTEGER     | TIMESTAMP     | OBJECT         |
+--------------+-------------+---------------+----------------+