datafusion.functions

datafusion.functions.abs()
datafusion.functions.acos()
datafusion.functions.approx_distinct()
datafusion.functions.alias()

Creates a new Alias expression

datafusion.functions.array()
datafusion.functions.ascii()

Returns the numeric code of the first character of the argument. In UTF8 encoding, returns the Unicode code point of the character. In other multibyte encodings, the argument must be an ASCII character.

datafusion.functions.asin()
datafusion.functions.atan()
datafusion.functions.avg()
datafusion.functions.bit_length()

Returns number of bits in the string (8 times the octet_length).

datafusion.functions.btrim()

Removes the longest string containing only characters in characters (a space by default) from the start and end of string.

datafusion.functions.ceil()
datafusion.functions.character_length()

Returns number of characters in the string.

datafusion.functions.chr()

Returns the character with the given code.

datafusion.functions.concat_ws()

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.

datafusion.functions.concat()

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

datafusion.functions.cos()
datafusion.functions.count()
datafusion.functions.digest()

Computes a binary hash of the given data. type is the algorithm to use. Standard algorithms are md5, sha224, sha256, sha384, sha512, blake2s, blake2b, and blake3.

datafusion.functions.exp()
datafusion.functions.floor()
datafusion.functions.in_list()
datafusion.functions.initcap()

Converts the first letter of each word to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters.

datafusion.functions.left()

Returns first n characters in the string, or when n is negative, returns all but last |n| characters.

datafusion.functions.ln()
datafusion.functions.log10()
datafusion.functions.log2()
datafusion.functions.lower()

Converts the string to all lower case

datafusion.functions.lpad()

Extends the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).

datafusion.functions.ltrim()

Removes the longest string containing only characters in characters (a space by default) from the start of string.

datafusion.functions.max()
datafusion.functions.md5()

Computes the MD5 hash of the argument, with the result written in hexadecimal.

datafusion.functions.min()
datafusion.functions.now()

Current date and time

datafusion.functions.octet_length()

Returns number of bytes in the string. Since this version of the function accepts type character directly, it will not strip trailing spaces.

datafusion.functions.order_by()

Creates a new Sort expression

datafusion.functions.random()

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

datafusion.functions.regexp_match()
datafusion.functions.regexp_replace()

Replaces substring(s) matching a POSIX regular expression

datafusion.functions.repeat()

Repeats string the specified number of times.

datafusion.functions.replace()

Replaces all occurrences in string of substring from with substring to.

datafusion.functions.reverse()

Reverses the order of the characters in the string.

datafusion.functions.right()

Returns last n characters in the string, or when n is negative, returns all but first |n| characters.

datafusion.functions.round()
datafusion.functions.rpad()

Extends the string to length length by appending the characters fill (a space by default). If the string is already longer than length then it is truncated.

datafusion.functions.rtrim()

Removes the longest string containing only characters in characters (a space by default) from the end of string.

datafusion.functions.sha224()
datafusion.functions.sha256()
datafusion.functions.sha384()
datafusion.functions.sha512()
datafusion.functions.signum()
datafusion.functions.sin()
datafusion.functions.split_part()

Splits string at occurrences of delimiter and returns the n’th field (counting from one).

datafusion.functions.sqrt()
datafusion.functions.starts_with()

Returns true if string starts with prefix.

datafusion.functions.strpos()

Returns starting index of specified substring within string, or zero if it’s not present. (Same as position(substring in string), but note the reversed argument order.)

datafusion.functions.substr()
datafusion.functions.sum()
datafusion.functions.tan()
datafusion.functions.to_hex()

Converts the number to its equivalent hexadecimal representation.

datafusion.functions.to_timestamp()
datafusion.functions.translate()

Replaces each character in string that matches a character in the from set with the corresponding character in the to set. If from is longer than to, occurrences of the extra characters in from are deleted.

datafusion.functions.trim()

Removes the longest string containing only characters in characters (a space by default) from the start, end, or both ends (BOTH is the default) of string.

datafusion.functions.trunc()
datafusion.functions.upper()

Converts the string to all upper case.

datafusion.functions.window()

Creates a new Window function expression