gravitino.dto.rel.sort_order_dto.SortOrderDTO¶
- class gravitino.dto.rel.sort_order_dto.SortOrderDTO(sort_term: FunctionArg, direction: SortDirection, null_ordering: NullOrdering)¶
Bases:
SortOrder
Data Transfer Object for SortOrder.
- Attributes:
- EMPTY_SORT (list[SortOrderDTO]):
An empty array of SortOrderDTO.
- __init__(sort_term: FunctionArg, direction: SortDirection, null_ordering: NullOrdering)¶
Methods
__init__
(sort_term, direction, null_ordering)children
()Returns the children expressions of this sort order.
Returns the sort direction.
Returns the sort expression.
Returns the null ordering.
Returns a list of fields or columns that are referenced by this expression.
Returns the sort term.
validate
(columns)Validates the sort order.
Attributes
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.
EMPTY_SORT
- 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.
- children() List[Expression] ¶
Returns the children expressions of this sort order.
- direction()¶
Returns the sort direction.
- expression() Expression ¶
Returns the sort expression.
- null_ordering()¶
Returns the null ordering.
- references() List[NamedReference] ¶
Returns a list of fields or columns that are referenced by this expression.
- sort_term() FunctionArg ¶
Returns the sort term.
- Returns:
FunctionArg: The sort term.
- validate(columns: list[gravitino.dto.rel.column_dto.ColumnDTO]) None ¶
Validates the sort order.
- Args:
- columns (list[ColumnDTO]):
The column DTOs to validate against.
- Raises:
- IllegalArgumentException:
If the sort order is invalid, this exception is thrown.