Skip to content

daft.functions.list_max#

list_max #

list_max(list_expr: Expression) -> Expression

Calculates the maximum of each list. If no non-null values in a list, the result is null.

Parameters:

Name Type Description Default
list_expr List Expression

expression to calculate the maximum of.

required

Returns:

Name Type Description
Expression Expression

an expression with the type of the list values representing the maximum value in the list

Source code in daft/functions/list.py
142
143
144
145
146
147
148
149
150
151
152
def list_max(list_expr: Expression) -> Expression:
    """Calculates the maximum of each list. If no non-null values in a list, the result is null.

    Args:
        list_expr (List Expression): expression to calculate the maximum of.

    Returns:
        Expression:
            an expression with the type of the list values representing the maximum value in the list
    """
    return Expression._call_builtin_scalar_fn("list_max", list_expr)