gravitino.dto.rel.expressions.unparsed_expression_dto.UnparsedExpressionDTO¶
- class gravitino.dto.rel.expressions.unparsed_expression_dto.UnparsedExpressionDTO(unparsed_expression: str)¶
Bases:
UnparsedExpression
,FunctionArg
Data transfer object representing an unparsed expression.
- __init__(unparsed_expression: str)¶
Methods
__init__
(unparsed_expression)arg_type
()Arguments type of the function.
builder
()A builder instance for UnparsedExpressionDTO.
children
()Unparsed expressions do not have children.
of
(unparsed_expression)Creates a new UnparsedExpression with the given unparsed expression.
Returns a list of fields or columns that are referenced by this expression.
Returns the unparsed expression as a string.
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 UnparsedExpressionDTO.
- build() UnparsedExpressionDTO ¶
Build the unparsed expression.
- Returns:
UnparsedExpressionDTO: The unparsed expression.
- 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.
- static builder() Builder ¶
A builder instance for UnparsedExpressionDTO.
- Returns:
Builder: A builder instance for UnparsedExpressionDTO.
- children() list[gravitino.api.expressions.expression.Expression] ¶
Unparsed expressions do not have children.
- static of(unparsed_expression: str) UnparsedExpressionImpl ¶
Creates a new UnparsedExpression with the given unparsed expression.
- Parameters:
unparsed_expression – The unparsed expression as a string.
- Returns:
The created UnparsedExpression.
- references() List[NamedReference] ¶
Returns a list of fields or columns that are referenced by this expression.
- unparsed_expression() str ¶
Returns the unparsed expression as a string.
- Returns:
str: The value of the unparsed expression.