OPAL Numeric Functions¶
Numeric functions act on and/or produce numeric values, for your mathematical calculation needs.
Function |
Description |
---|---|
Returns the absolute value of ‘val’. |
|
returns the number of elements in an array, or null if input is not an array |
|
Returns ‘val’ rounded up to the given ‘precision’. |
|
Count the number of non-null items in the group. |
|
Estimate the approximate number of distinct values in the input using hyper-log-log. |
|
Count the exact number of distinct values in the input using complete enumeration (slower than [count_distinct](. |
|
Returns the dense rank within an ordered group of values. |
|
Returns Euler’s number e raised to the given number. |
|
Generate a float representation of the argument value. |
|
Returns a null value of type float64. |
|
Returns ‘val’ rounded down to the given ‘precision’. |
|
Accepts a variable number of arguments of arbitrary types and returns a signed 64-bit hash. |
|
Computes the great circle approximate distance between two latitude/longitude coordinates, using the haversine formula. |
|
Generate an integer representation of the argument value. |
|
Returns a null value of type int64. |
|
Returns the integer quotient of the dividend divided by the divisor and truncates the remainder. |
|
Given an IPv4 address string in dotted-quad format, possibly with a slash-masksize trailing component, convert the address to an |
|
Given an IPv4 address string in dotted-quad format, convert the address to an integer representing the address in big-endian |
|
Returns natural logarithm of a numeric expression. |
|
Returns logarithm of a numeric expression (second argument) with the provided base (first argument). |
|
Returns the remainder when dividend is divided by the divisor. |
|
Returns a null value of type numeric. |
|
Parses a string encoded hex number and returns an int64. |
|
Assuming a discrete distribution, it returns the value for the specified percentile of the input expression across the group. |
|
Returns a number ‘base’ raised to the specified power ‘exponent’. |
|
prom_quantile calculates an approximate percentile value based on the distribution in a histogram metric that was generated by a |
|
Returns the rank within an ordered group of values. |
|
Returns ‘val’ rounded to the given ‘precision’. |
|
Return the window index of the row within its groupby, when ordered by the orderby. |
|
Returns the square root for a given input and null if input is negative. |
|
Compute the length of an input string. |
|
Convert a duration to a number of days. |
|
Convert a duration to a number of hours. |
|
Convert a duration to a number of milliseconds. |
|
Convert a duration to a number of minutes. |
|
Convert a duration to a number of nanoseconds. |
|
Convert a duration to a number of seconds. |
|
Convert a duration to a number of weeks. |
|
Construct equi-width histogram by dividing up the range between |