math Module
Number crunching and aggregations for your queries.
Quick Example
$ Quick Example
Aggregation Functions
Use these with the aggregate transform to summarize your data.
Scalar Functions
Apply math to individual values, row by row.
math::abs
Get the absolute value of a number
math::round
Round to the nearest integer or decimal place
math::floor
Round down to the nearest integer
math::ceil
Round up to the nearest integer
math::power
Raise a number to a power
math::sqrt
Compute the square root
math::sign
Return the sign of a number (-1, 0, or 1)
math::clamp
Clamp a value within a range
math::mod
Compute the modulo (remainder)
math::truncate
Truncate a number toward zero
math::gcd
Greatest common divisor
math::lcm
Least common multiple
Trigonometric Functions
Standard trigonometric functions operating in radians.
Logarithmic & Exponential
Logarithms, exponentials, and mathematical constants.
Function Reference
| Function | Type | Description |
|---|---|---|
math::sum | Aggregation | Calculate the sum of numeric values |
math::avg | Aggregation | Calculate the average of numeric values |
math::min | Aggregation | Find the minimum value |
math::max | Aggregation | Find the maximum value |
math::abs | Scalar | Get the absolute value of a number |
math::round | Scalar | Round to the nearest integer or decimal place |
math::floor | Scalar | Round down to the nearest integer |
math::ceil | Scalar | Round up to the nearest integer |
math::power | Scalar | Raise a number to a power |
math::sqrt | Scalar | Compute the square root |
math::sign | Scalar | Return the sign of a number |
math::clamp | Scalar | Clamp a value within a range |
math::mod | Scalar | Compute the modulo (remainder) |
math::truncate | Scalar | Truncate a number toward zero |
math::gcd | Scalar | Greatest common divisor |
math::lcm | Scalar | Least common multiple |
math::sin | Trigonometric | Compute the sine |
math::cos | Trigonometric | Compute the cosine |
math::tan | Trigonometric | Compute the tangent |
math::asin | Trigonometric | Compute the arcsine |
math::acos | Trigonometric | Compute the arccosine |
math::atan | Trigonometric | Compute the arctangent |
math::atan2 | Trigonometric | Two-argument arctangent |
math::exp | Exponential | Compute e raised to a power |
math::log | Logarithmic | Natural logarithm (base e) |
math::log2 | Logarithmic | Base-2 logarithm |
math::log10 | Logarithmic | Base-10 logarithm |
math::e | Constant | Euler's number (~2.71828) |
math::pi | Constant | Pi (~3.14159) |
