All functions > ARRAY

All functions in the ARRAY category.

Backend availability

DD Available DD Partially available DD Not available DD DuckDB · PG Postgres · CH ClickHouse · TR Trino · BQ BigQuery · SF Snowflake · DB Databricks · SV Serving

Element Access

FunctionDescriptionBackends
ELEMENT_AT_POS()Returns the element at the specified position in an array.DDPGCHTRBQSFDBSV
ELEMENTS_AT_POS()Returns the elements at multiple specified positions in an array.DDPGCHTRBQSFDBSV
SLICE_LEN()Returns a slice of an array using start:length:step semantics.DDPGCHTRBQSFDBSV
SLICE_END()Returns the slice of an array or a string from a start index to an end index (inclusive).DDPGCHTRBQSFDBSV

Search And Lookup

FunctionDescriptionBackends
CONTAINS()Returns TRUE if the array contains the specified element.DDPGCHTRBQSFDBSV
CONTAINS_SEQUENCE()Returns TRUE if the array contains the specified sequence as a contiguous subsequence.DDPGCHTRBQSFDBSV
ARRAY_POSITION()Returns the 1-based position of the first occurrence of an element in an array.DDPGCHTRBQSFDBSV
ARRAY_LOOKUP(...)Returns the value corresponding to a lookup key using parallel key-value arrays.DDPGCHTRBQSFDBSV

Filtering And Transformation

FunctionDescriptionBackends
ARRAY_SORT()Returns the sorted version of an array.DDPGCHTRBQSFDBSV
ARRAY_REVERSE()Returns the reverse of an array.DDPGCHTRBQSFDBSV
ARRAY_ENUMERATE()Returns an array of rows pairing each 1-based position with the corresponding element.DDPGCHTRBQSFDBSV
ARRAY_ENUMERATE_FLATTEN()Returns an array of rows pairing each 1-based position with the flattened fields of the...DDPGCHTRBQSFDBSV
ARRAY_ROTATE()Returns a new array whose elements are rotated circularly; positive amounts shift left, negative...DDPGCHTRBQSFDBSV
NGRAMS()Returns adjacent n-element sub-sequences (n-grams) sliding across the input array.DDPGCHTRBQSFDBSV
ARRAY_DISTINCT()Returns an array with distinct elements, in order of first occurrence.DDPGCHTRBQSFDBSV
ARRAY_REMOVE()Returns an array with all occurrences of the specified element removed.DDPGCHTRBQSFDBSV
FLATTEN()Flattens a nested array structure into a single-level array.DDPGCHTRBQSFDBSV

Set Operations

FunctionDescriptionBackends
ARRAY_UNION()Returns the union of two arrays, keeping the first occurrence of each element.DDPGCHTRBQSFDBSV
ARRAY_INTERSECT()Returns the intersection of two arrays using set semantics.DDPGCHTRBQSFDBSV
ARRAY_EXCEPT()Returns the difference of two arrays using set semantics.DDPGCHTRBQSFDBSV
ARRAYS_OVERLAP()Returns TRUE if any elements are common between the two arrays.DDPGCHTRBQSFDBSV

Aggregation And Statistics

FunctionDescriptionBackends
ARRAY_COUNT()Returns the number of elements in an array.DDPGCHTRBQSFDBSV
ARRAY_SUM()Returns the sum of all numeric elements in an array.DDPGCHTRBQSFDBSV
ARRAY_PRODUCT()Returns the product of all numeric elements in an array as a DOUBLE.DDPGCHTRBQSFDBSV
ARRAY_MEDIAN()Returns the statistical median of numeric array elements as a DOUBLE.DDPGCHTRBQSFDBSV
ARRAY_STDDEV_POP()Returns the population standard deviation (divide by N) of numeric array elements as a DOUBLE.DDPGCHTRBQSFDBSV
ARRAY_STDDEV_SAMP()Returns the sample standard deviation (divide by N-1) of numeric array elements as a DOUBLE.DDPGCHTRBQSFDBSV
ARRAY_VAR_POP()Returns the population variance (divide by N) of numeric array elements as a DOUBLE.DDPGCHTRBQSFDBSV
ARRAY_VAR_SAMP()Returns the sample variance (divide by N-1) of numeric array elements as a DOUBLE.DDPGCHTRBQSFDBSV
ARRAY_AVG()Returns the arithmetic mean (average) of all numeric elements in an array.DDPGCHTRBQSFDBSV
ARRAY_MIN()Returns the smallest value in an array using natural ordering.DDPGCHTRBQSFDBSV
ARRAY_MAX()Returns the largest value in an array using natural ordering.DDPGCHTRBQSFDBSV
ARRAY_HISTOGRAM()Returns a frequency histogram of values in an array as an array of value-count pairs.DDPGCHTRBQSFDBSV

Boolean Operations

FunctionDescriptionBackends
ALL(...)Returns TRUE if all elements in the boolean array are true.DDPGCHTRBQSFDBSV
ANY(...)Returns TRUE if any element in the boolean array is true.DDPGCHTRBQSFDBSV
NONE(...)Returns TRUE if no elements in the boolean array are true.DDPGCHTRBQSFDBSV
ARRAY_NOT()Returns an array with inverted boolean values (logical NOT applied to each element).DDPGCHTRBQSFDBSV

Array Combination

FunctionDescriptionBackends
ARRAY_CONCAT(...)Concatenates multiple arrays into a single combined array with optional deduplication.DDPGCHTRBQSFDBSV
COMBINATIONS()Returns all 2-element sub-groups of the input array as an array of 2-element arrays.DDPGCHTRBQSFDBSV
PERMUTATIONS()Returns all ordered 2-element selections from the input array as an array of 2-element arrays.DDPGCHTRBQSFDBSV

Array Generation

FunctionDescriptionBackends
REPEAT()Creates an array by repeating an element a specified number of times.DDPGCHTRBQSFDBSV
SEQUENCE()Generates an inclusive array from start to stop. Accepts integers with an optional step (default...DDPGCHTRBQSFDBSV

String Conversion

FunctionDescriptionBackends
ARRAY_JOIN()Joins the elements of an array into a single string using a specified delimiter.DDPGCHTRBQSFDBSV

Vector Operations

FunctionDescriptionBackends
COSINE_SIMILARITY()Calculates the cosine similarity between two arrays.DDPGCHTRBQSFDBSV
DOT_PRODUCT()Calculates the dot product of two arrays.DDPGCHTRBQSFDBSV
EUCLIDEAN_DISTANCE()Calculates the Euclidean distance between two arrays.DDPGCHTRBQSFDBSV
NORMALIZE()Normalizes a numeric array by dividing each element by the sum of all elements.DDPGCHTRBQSFDBSV

Summary
Functions in this category: 47

This documentation is automatically generated from the FeatureMesh registry.