Class SortOrders
java.lang.Object
org.apache.gravitino.rel.expressions.sorts.SortOrders
Helper methods to create SortOrders to pass into Apache Gravitino.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCreate a sort order by the given expression with the given sort direction and null ordering. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SortOrders.SortImplascending(Expression expression) Create a sort order by the given expression with the ascending sort direction and nulls first ordering.static SortOrders.SortImpldescending(Expression expression) Create a sort order by the given expression with the descending sort direction and nulls last ordering.static SortOrders.SortImplof(Expression expression, SortDirection direction) Create a sort order by the given expression with the given sort direction and default null ordering.static SortOrders.SortImplof(Expression expression, SortDirection direction, NullOrdering nullOrdering) Create a sort order by the given expression with the given sort direction and null ordering.
-
Field Details
-
NONE
NONE is used to indicate that there is no sort order.
-
-
Method Details
-
ascending
Create a sort order by the given expression with the ascending sort direction and nulls first ordering.- Parameters:
expression- The expression to sort by- Returns:
- The created sort order
-
descending
Create a sort order by the given expression with the descending sort direction and nulls last ordering.- Parameters:
expression- The expression to sort by- Returns:
- The created sort order
-
of
Create a sort order by the given expression with the given sort direction and default null ordering.- Parameters:
expression- The expression to sort bydirection- The sort direction- Returns:
- The created sort order
-
of
public static SortOrders.SortImpl of(Expression expression, SortDirection direction, NullOrdering nullOrdering) Create a sort order by the given expression with the given sort direction and null ordering.- Parameters:
expression- The expression to sort bydirection- The sort directionnullOrdering- The null ordering- Returns:
- The created sort order
-