gravitino.dto.rel.expressions.func_expression_dto.FuncExpressionDTO¶
- class gravitino.dto.rel.expressions.func_expression_dto.FuncExpressionDTO(function_name: str, function_args: List[FunctionArg])¶
Bases:
FunctionExpression
,FunctionArg
- __init__(function_name: str, function_args: List[FunctionArg])¶
Methods
__init__
(function_name, function_args)arg_type
()Arguments type of the function.
args
()The function arguments.
Returns the arguments passed to the function.
builder
()The builder for creating a new instance of FuncExpressionDTO.
children
()Returns the arguments as children.
Returns the function name.
of
(function_name, *arguments)Creates a new FunctionExpression with the given function name.
Returns a list of fields or columns that are referenced by this expression.
validate
(columns)Validates the function argument.
Attributes
EMPTY_ARGS
EMPTY_EXPRESSION is only used as an input when the default children method builds the result.
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.
- class Builder¶
Bases:
object
Builder for FuncExpressionDTO.
- build() FuncExpressionDTO ¶
Build the function expression.
- Returns:
FuncExpressionDTO: The function expression.
- with_function_args(function_args: List[FunctionArg]) Builder ¶
Set the function arguments for the function expression.
- Args:
function_args (List[FunctionArg]): The function arguments.
- Returns:
FuncExpressionDTO.Builder: The builder.
- 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.
- args() List[FunctionArg] ¶
The function arguments.
- Returns:
List[FunctionArg]: The function arguments.
- arguments() List[Expression] ¶
Returns the arguments passed to the function.
- static builder() Builder ¶
The builder for creating a new instance of FuncExpressionDTO.
- Returns:
Builder: The builder for creating a new instance of FuncExpressionDTO.
- children() list[gravitino.api.expressions.expression.Expression] ¶
Returns the arguments as children.
- 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.