This section contains a summary of all functions supported in UQL.
Path Functions
Function |
Description |
---|---|
length() | Returns the number of edges in a path. |
pedges() | Collects edges in a path into a list. |
pnodes() | Collects nodes in a path into a list. |
Aggregate Functions
Function |
Description |
---|---|
avg() | Computes the average of a set of numeric values. |
collect() | Collects a set of values into a list. |
count() | Returns the number of rows in the input. |
max() | Returns the maximum value in a set of values. |
min() | Returns the minimum value in a set of values. |
stddev_pop() | Computes the population standard deviation of a set of numeric values. |
stddev_samp() | Computes the sample standard deviation of a set of numeric values. |
sum() | Computes the sum of a set of numeric values. |
Mathematical Functions
Function |
Description |
---|---|
abs() | Returns the absolute value of a given number. |
ceil() | Rounds a given number up to the nearest integer. |
floor() | Rounds a given number down to the nearest integer. |
pi() | Returns the mathematical constant π (pi). |
pow() | Raises a number to the power of another number. |
round() | Returns the nearest value of a given number, rounded to a specified position of digits. |
sqrt() | Computes the square root of a given number. |
Trigonometric Functions
Function |
Description |
---|---|
acos() | Computes the angle in radians whose cosine is a given number. |
asin() | Computes the angle in radians whose sine is a given number. |
atan() | Computes the angle in radians whose tangent is a given number. |
cos() | Computes the cosine of an angle expressed in radian. |
cot() | Computes the cotangent of an angle expressed in radian. |
sin() | Computes the sine of an angle expressed in radian. |
tan() | Computes the tangent of an angle expressed in radian. |
String Functions
Function |
Description |
---|---|
btrim() | Removes characters from both ends of a given string until encountering a character that is not contained in the specified set of characters. |
endsWith() | Checks whether a string ends with a specified substring. |
length() | Returns the number of characters in a string. |
lower() | Converts all the characters in a given string to lowercase. |
ltrim() | Removes characters from the begining of a given string until encountering a character that is not contained in the specified set of characters. |
rtrim() | Removes characters from the end of a given string until encountering a character that is not contained in the specified set of characters. |
split() | Splits a string into a list of substrings using the specified delimiter. |
startsWith() | Checks whether a string begins with a specified substring. |
upper() | Converts all the characters in a given string to uppercase. |
List Functions
Function |
Description |
---|---|
append() | Adds an element to the end of a list and returns the new list. |
difference() | Returns the difference between two lists. |
head() | Returns the first element in a list. |
intersection() | Returns the intersection of two lists. |
listContains() | Checks whether a specified element exists in a list. |
listUnion() | Returns the union of two lists. |
reduce() | Performs a calculation iteratively using each element in a list. |
size() | Returns the number of elements in a list. |
Temporal Functions
Function |
Description |
---|---|
dateAdd() | Adds a specified time interval to a given date. |
dateDiff() | Computes the difference between two dates and returns the result as a specified unit of time. |
dateFormat() | Prints a given date in the specific format. |
day() | Extracts the day component from a given date. |
dayOfWeek() | Returns a number representing the day of the week for a given date. |
month() | Extracts the month component from a given date. |
now() | Returns the current date and time in Coordinated Universal Time (UTC). |
year() | Extracts the year component from a given date. |
Spatial Functions
Function |
Description |
---|---|
distance() | Computes the straight-line distance between two points. |
point() | Combines two numbers representing latitude and longitude into a point. |
Table Functions
Function |
Description |
---|---|
table() | Constructs an output table. |
Null Functions
Function |
Description |
---|---|
coalesce() | Returns the first non-null value from a list of provided values. |
Type Conversion Functions
Function |
Description |
---|---|
toDouble() | Converts a value to a double-precision floating-point number. |
toFloat() | Converts a value to a single-precision floating-point number. |
toInteger() | Converts a value to a 64-bit integer. |
toString() | Converts a value to a string. |