Expand description

Functions for creating logical expressions

Functions

absolute value

inverse cosine

Return a new expression with a logical AND

Returns the approximate number of distinct input values. This function provides an approximation of count(DISTINCT x). Zero is returned if all input values are null. This function should produce a standard error of 0.81%, which is the standard deviation of the (approximately normal) error distribution over all possible sets. It does not guarantee an upper bound on the error for any specific input set.

Calculate an approximation of the median for expr.

Calculate an approximation of the specified percentile for expr.

Calculate an approximation of the specified percentile for expr and weight_expr.

Returns an array of fixed size with each argument on it.

data type

Scalar function definition for ascii

inverse sine

inverse tangent

Scalar function definition for atan2

Create an expression to represent the avg() aggregate function

Return a new expression l r

Scalar function definition for bit_length

Scalar function definition for btrim

Calls a named built in function

Create a CASE WHEN statement with literal WHEN expressions for comparison to the base expression.

Create a cast expression

nearest integer greater than or equal to argument

Scalar function definition for character_length

Scalar function definition for chr

Returns coalesce(args...), which evaluates to the value of the first Expr which is not NULL

Create a column expression based on a qualified or unqualified column name

Combines an array of filter expressions into a single filter expression consisting of the input filter expressions joined with logical AND. Returns None if the filters array is empty.

Concatenates the text representations of all the arguments. NULL arguments are ignored.

Scalar function definition for concat_expr

Concatenates all but the first argument, with separators. The first argument is used as the separator string, and should not be NULL. Other NULL arguments are ignored.

Scalar function definition for concat_ws_expr

cosine

Create an expression to represent the count() aggregate function

Create an expression to represent the count(distinct) aggregate function

Creates a new UDAF with a specific signature, state type and return type. The signature and state type must match the Accumulator's implementation.

Creates a new UDF with a specific signature and specific return type. This is a helper function to create a new UDF. The function create_udf returns a subset of all possible ScalarFunction:

Create a grouping set for all combination of exprs

Scalar function definition for date_bin

Scalar function definition for date_part

Scalar function definition for date_trunc

Scalar function definition for digest

Create an EXISTS subquery expression

base 2 logarithm

nearest integer less than or equal to argument

Scalar function definition for from_unixtime

Create a grouping set

Create an in_list expression

Create an IN subquery expression

Scalar function definition for initcap

Scalar function definition for left

Scalar function definition for length

natural logarithm

base 10 logarithm

base 10 logarithm

Scalar function definition for lower

Scalar function definition for lpad

Scalar function definition for ltrim

Create an expression to represent the max() aggregate function

Scalar function definition for md5

Create an expression to represent the min() aggregate function

Create a NOT EXISTS subquery expression

Create a NOT IN subquery expression

current time

Scalar function definition for now_expr

The NULLIF function returns a null value if value1 equals value2; otherwise it returns value1. This can be used to perform the inverse operation of the COALESCE expression.

Scalar function definition for octet_length

Return a new expression with a logical OR

Scalar function definition for power

Returns a random value in the range 0.0 <= x < 1.0

Scalar function definition for regexp_match

Scalar function definition for regexp_replace

Scalar function definition for repeat

Scalar function definition for replace

Scalar function definition for reverse

Scalar function definition for right

Create a grouping set for rollup

round to nearest integer

Scalar function definition for rpad

Scalar function definition for rtrim

Create a scalar subquery expression

Scalar function definition for sha224

Scalar function definition for sha256

Scalar function definition for sha384

Scalar function definition for sha512

sign of the argument (-1, 0, +1)

sine

Scalar function definition for split_part

square root of a number

Scalar function definition for starts_with

Scalar function definition for strpos

Scalar function definition for substr

Create an expression to represent the sum() aggregate function

tangent

Scalar function definition for to_hex

Scalar function definition for to_timestamp_micros

Scalar function definition for to_timestamp_millis

Scalar function definition for to_timestamp_seconds

Scalar function definition for translate

Scalar function definition for trim

truncate toward zero

Recursively un-alias an expressions

Scalar function definition for upper

Create a CASE WHEN statement with boolean WHEN expressions and no base expression.