View on GitHub

JODA - JSON On Demand Analysis

Efficient data wrangling for semi-structured JSON documents

TRUNC - Mathematical

Truncates the floating point number

Input parameters

Name Type Optional Description
x Number False  

Output

Number: trunc(x)

Usage

TRUNC(<x>)

Examples

Example 1

Query

LOAD tmp
AS ('': TRUNC(1.5))

Result

1.0

Example 2

Query

LOAD tmp
AS ('': TRUNC(1.1))

Result

1.0

Example 3

Query

LOAD tmp
AS ('': TRUNC(-1.9))

Result

-1.0