Expand description
Fluent-style API for creating Expr
s
Functions§
- abs
- returns the absolute value of a given number
- acos
- returns the arc cosine or inverse cosine of a number
- acosh
- returns inverse hyperbolic cosine
- arrow_
cast - Returns value2 if value1 is NULL; otherwise it returns value1
- arrow_
typeof - Returns the Arrow type of the input expression.
- ascii
- Returns the numeric code of the first character of the argument.
- asin
- returns the arc sine or inverse sine of a number
- asinh
- returns inverse hyperbolic sine
- atan
- returns inverse tangent
- atan2
- returns inverse tangent of a division given in the argument
- atanh
- returns inverse hyperbolic tangent
- bit_
length - Returns the number of bits in the
string
- btrim
- Removes all characters, spaces by default, from both sides of a string
- cbrt
- cube root of a number
- ceil
- nearest integer greater than or equal to argument
- char_
length - the number of characters in the
string
- character_
length - the number of characters in the
string
- chr
- Converts the Unicode code point to a UTF8 character
- coalesce
- Returns
coalesce(args...)
, which evaluates to the value of the first expr which is not NULL - concat
- Concatenates the text representations of all the arguments. NULL arguments are ignored
- 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.
- contains
- Return true if search_string is found within string.
- cos
- cosine
- cosh
- hyperbolic cosine
- cot
- cotangent of a number
- current_
date - returns current UTC date as a Date32 value
- current_
time - returns current UTC time as a Time64 value
- date_
bin - coerces an arbitrary timestamp to the start of the nearest specified interval
- date_
part - extracts a subfield from the date
- date_
trunc - truncates the date to a specified level of precision
- decode
- decode the
input
, using theencoding
. encoding can be base64 or hex - degrees
- converts radians to degrees
- digest
- Computes the binary hash of an expression using the specified algorithm.
- encode
- encode the
input
, using theencoding
. encoding can be base64 or hex - ends_
with - Returns true if the
string
ends with thesuffix
, false otherwise. - exp
- exponential
- factorial
- factorial
- find_
in_ set - Returns a value in the range of 1 to N if the string
str
is in the string liststrlist
consisting of N substrings - floor
- nearest integer less than or equal to argument
- from_
unixtime - converts an integer to RFC3339 timestamp format string
- gcd
- greatest common divisor
- get_
field - Returns the value of the field with the given name from the struct
- greatest
- Returns
greatest(args...)
, which evaluates to the greatest value in the list of expressions or NULL if all the expressions are NULL - initcap
- converts the first letter of each word in
string
in uppercase and the remaining characters in lowercase - instr
- finds the position from where the
substring
matches thestring
- isnan
- returns true if a given number is +NaN or -NaN otherwise returns false
- iszero
- returns true if a given number is +0.0 or -0.0 otherwise returns false
- lcm
- least common multiple
- least
- Returns
least(args...)
, which evaluates to the smallest value in the list of expressions or NULL if all the expressions are NULL - left
- returns the first
n
characters in thestring
- length
- the number of characters in the
string
- levenshtein
- Returns the Levenshtein distance between the two given strings
- ln
- natural logarithm (base e) of a number
- log
- logarithm of a number for a particular
base
- log2
- base 2 logarithm of a number
- log10
- base 10 logarithm of a number
- lower
- Converts a string to lowercase.
- lpad
- fill up a string to the length by prepending the characters
- ltrim
- Removes all characters, spaces by default, from the beginning of a string
- make_
date - make a date from year, month and day component parts
- md5
- Computes an MD5 128-bit checksum for a string expression.
- named_
struct - Returns a struct with the given names and arguments pairs
- nanvl
- returns x if x is not NaN otherwise returns y
- now
- returns the current timestamp in nanoseconds, using the same value for all instances of now() in same statement
- nullif
- Returns NULL if value1 equals value2; otherwise it returns value1. This can be used to perform the inverse operation of the COALESCE expression
- nvl
- Returns value2 if value1 is NULL; otherwise it returns value1
- nvl2
- Returns value2 if value1 is not NULL; otherwise, it returns value3.
- octet_
length - returns the number of bytes of a string
- overlay
- replace the substring of string that starts at the start’th character and extends for count characters with new substring
- pi
- Returns an approximate value of π
- position
- finds the position from where the
substring
matches thestring
- power
base
raised to the power ofexponent
- radians
- converts degrees to radians
- random
- Returns a random value in the range 0.0 <= x < 1.0
- regexp_
count - Returns the number of consecutive occurrences of a regular expression in a string.
- regexp_
like - Returns true if a has at least one match in a string, false otherwise.
- regexp_
match - Returns a list of regular expression matches in a string.
- regexp_
replace - Replaces substrings in a string that match.
- repeat
- Repeats the
string
ton
times - replace
- Replaces all occurrences of
from
withto
in thestring
- reverse
- reverses the
string
- right
- returns the last
n
characters in thestring
- round
- round to nearest integer
- rpad
- fill up a string to the length by appending the characters
- rtrim
- Removes all characters, spaces by default, from the end of a string
- sha224
- Computes the SHA-224 hash of a binary string.
- sha256
- Computes the SHA-256 hash of a binary string.
- sha384
- Computes the SHA-384 hash of a binary string.
- sha512
- Computes the SHA-512 hash of a binary string.
- signum
- sign of the argument (-1, 0, +1)
- sin
- sine
- sinh
- hyperbolic sine
- split_
part - Splits a string based on a delimiter and picks out the desired field based on the index.
- sqrt
- square root of a number
- starts_
with - Returns true if string starts with prefix.
- strpos
- finds the position from where the
substring
matches thestring
- struct
- Returns a struct with the given arguments
- substr
- substring from the
position
to the end - substr_
index - Returns the substring from str before count occurrences of the delimiter
- substring
- substring from the
position
withlength
characters - tan
- returns the tangent of a number
- tanh
- returns the hyperbolic tangent of a number
- to_char
- Returns a string representation of a date, time, timestamp or duration based on a Chrono pattern.
- to_date
- to_hex
- Converts an integer to a hexadecimal string.
- to_
local_ time - converts a timezone-aware timestamp to local time (with no offset or timezone information), i.e. strips off the timezone from the timestamp
- to_
timestamp - converts a string and optional formats to a
Timestamp(Nanoseconds, None)
- to_
timestamp_ micros - converts a string and optional formats to a
Timestamp(Microseconds, None)
- to_
timestamp_ millis - converts a string and optional formats to a
Timestamp(Milliseconds, None)
- to_
timestamp_ nanos - converts a string and optional formats to a
Timestamp(Nanoseconds, None)
- to_
timestamp_ seconds - converts a string and optional formats to a
Timestamp(Seconds, None)
- to_
unixtime - converts a string and optional formats to a Unixtime
- translate
- replaces the characters in
from
with the counterpart into
- trim
- Removes all characters, spaces by default, from both sides of a string
- trunc
- truncate toward zero, with optional precision
- union_
extract - Returns the value of the field with the given name from the union when it’s selected, or NULL otherwise
- upper
- Converts a string to uppercase.
- uuid
- returns uuid v4 as a string value