gravitino.dto.rel.expressions.function_arg.FunctionArg

class gravitino.dto.rel.expressions.function_arg.FunctionArg

Bases: Expression

An argument of a function.

__init__()

Methods

__init__()

arg_type()

Arguments type of the function.

children()

Returns a list of the children of this node.

references()

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

validate(columns)

Validates the function argument.

Attributes

EMPTY_ARGS

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.

class ArgType(value)

Bases: str, Enum

The type of the argument.

The supported types are:

  • LITERAL: A literal argument.

  • FIELD: A field argument.

  • FUNCTION: A function argument.

  • UNPARSED: An unparsed argument.

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 arg_type() ArgType

Arguments type of the function.

Returns:

ArgType: The type of this argument.

abstract children() List[Expression]

Returns a list of the children of this node. Children should not change.

references() List[NamedReference]

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

validate(columns: List[ColumnDTO]) None

Validates the function argument.

Args:

columns (List[ColumnDTO]): The columns of the table.

Raises:

IllegalArgumentException: If the function argument is invalid.