Package org.apache.iceberg
Class SortOrder.Builder
java.lang.Object
org.apache.iceberg.SortOrder.Builder
- All Implemented Interfaces:
SortOrderBuilder<SortOrder.Builder>
- Enclosing class:
- SortOrder
A builder used to create valid
sort orders
.
Call SortOrder.builderFor(Schema)
to create a new builder.
-
Method Summary
Modifier and TypeMethodDescriptionAdd an expression term to the sort, ascending with the given null order.build()
caseSensitive
(boolean sortCaseSensitive) Set case sensitivity of sort column name resolution.Add an expression term to the sort, descending with the given null order.sortBy
(String name, SortDirection direction, NullOrder nullOrder) sortBy
(Term term, SortDirection direction, NullOrder nullOrder) withOrderId
(int newOrderId)
-
Method Details
-
asc
Add an expression term to the sort, ascending with the given null order.- Specified by:
asc
in interfaceSortOrderBuilder<SortOrder.Builder>
- Parameters:
term
- an expression termnullOrder
- a null order (first or last)- Returns:
- this for method chaining
-
desc
Add an expression term to the sort, descending with the given null order.- Specified by:
desc
in interfaceSortOrderBuilder<SortOrder.Builder>
- Parameters:
term
- an expression termnullOrder
- a null order (first or last)- Returns:
- this for method chaining
-
sortBy
-
sortBy
-
withOrderId
-
caseSensitive
Description copied from interface:SortOrderBuilder
Set case sensitivity of sort column name resolution.- Specified by:
caseSensitive
in interfaceSortOrderBuilder<SortOrder.Builder>
- Parameters:
sortCaseSensitive
- when true, column name resolution is case-sensitive- Returns:
- this for method chaining
-
build
-