functions_list.yaml¶
This document file is generated for functions_list.yaml. The extension URN is extension:io.substrait:functions_list.
Scalar Functions¶
transform¶
Implementations: transform(input, transformer): -> return_type 0. transform(list<any1>, func<any1 -> any2>): -> list<any2>
Transforms each element of a list using the provided function. Also known as “map” in functional programming. Returns a new list where each element is the result of applying the transformer to the corresponding element in the input list. The transformer receives one parameter (the current element) and must return the transformed value. If the input list is null, the result is null.
filter¶
Implementations: filter(input, predicate): -> return_type 0. filter(list<any1>, func<any1 -> boolean?>): -> list<any1>
Filters a list of elements based on a predicate function. Returns a new list containing only elements for which the predicate function returns true. The predicate receives one parameter (the current element) and must return a boolean. Elements for which the predicate returns true are included in the result. Elements for which the predicate returns false or null are excluded. If the input list is null, the result is null.
cardinality¶
Implementations: cardinality(input): -> return_type 0. cardinality(list<any1>): -> i64
Returns the number of elements in the list. Null elements are counted. If the input list is null, the result is null.
sort¶
Implementations: sort(input, option:direction): -> return_type 0. sort(list<any1>, option:direction): -> list<any1>
Sorts the elements of a list. Elements must be orderable. If the input list is null, the result is null.
Options:
any_match¶
Implementations: any_match(input, predicate): -> return_type 0. any_match(list<any1>, func<any1 -> boolean?>): -> boolean?
Returns true if the predicate returns true for any element of the list. More precisely * If the list is null, or the predicate is null, returns null. * If the list is empty, returns false as no element matches the predicate. Otherwise * Returns true if the predicate returns true for at least one element. * Returns false if the predicate returns false for all elements. * Returns null if the predicate does not return true for any element, and returns null for at least one element. This behaviour is equivalent to applying the predicate to every element of the list, and then OR-ing all of the results together. This is consistent with the Kleene logic defined in extension:io.substrait:functions_boolean::or
all_match¶
Implementations: all_match(input, predicate): -> return_type 0. all_match(list<any1>, func<any1 -> boolean?>): -> boolean?
Returns true if the predicate returns true for all elements of the list. More precisely * If the list is null, or the predicate is null, returns null. * If the list is empty, returns true as no element fails the predicate. Otherwise * Returns false if the predicate returns false for at least one element. * Returns true if the predicate returns true for all elements. * Returns null if the predicate does not return false for any element, and returns null for at least one element. This behaviour is equivalent to applying the predicate to every element of the list, and then AND-ing all of the results together. This is consistent with the Kleene logic defined in extension:io.substrait:functions_boolean::and