Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
datafusion::functions::expr_fn - Rust
[go: Go Back, main page]

Module expr_fn

Source
Expand description

Fluent-style API for creating Exprs

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 the encoding. 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 the encoding. encoding can be base64 or hex
ends_with
Returns true if the string ends with the suffix, 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 list strlist 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 the string
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 the string
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 the string
power
base raised to the power of exponent
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 to n times
replace
Replaces all occurrences of from with to in the string
reverse
reverses the string
right
returns the last n characters in the string
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 the string
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 with length 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 in to
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
union_tag
Returns the name of the currently selected field in the union
upper
Converts a string to uppercase.
uuid
returns uuid v4 as a string value