gravitino.api.expressions.function_expression.FunctionExpression

class gravitino.api.expressions.function_expression.FunctionExpression

Bases: Expression

The interface of a function expression. A function expression is an expression that takes a function name and a list of arguments.

__init__()

Methods

__init__()

arguments()

Returns the arguments passed to the function.

children()

Returns the arguments as children.

function_name()

Returns the function name.

of(function_name, *arguments)

Creates a new FunctionExpression with the given function name.

references()

Returns a list of fields or columns that are referenced by this expression.

Attributes

EMPTY_EXPRESSION

EMPTY_EXPRESSION is only used as an input when the default children method builds the result.

EMPTY_NAMED_REFERENCE

EMPTY_NAMED_REFERENCE is only used as an input when the default references method builds the result array to avoid repeatedly allocating an empty array.

EMPTY_EXPRESSION: List[Expression] = []

EMPTY_EXPRESSION is only used as an input when the default children method builds the result.

EMPTY_NAMED_REFERENCE: List[NamedReference] = []

EMPTY_NAMED_REFERENCE is only used as an input when the default references method builds the result array to avoid repeatedly allocating an empty array.

abstract arguments() list[Expression]

Returns the arguments passed to the function.

children() list[Expression]

Returns the arguments as children.

abstract function_name() str

Returns the function name.

static of(function_name: str, *arguments: Expression) FuncExpressionImpl

Creates a new FunctionExpression with the given function name. If no arguments are provided, it uses an empty expression.

Parameters:
  • function_name – The name of the function.

  • arguments – The arguments to the function (optional).

Returns:

The created FunctionExpression.

references() List[NamedReference]

Returns a list of fields or columns that are referenced by this expression.