Package org.apache.iceberg
Class SortOrder
java.lang.Object
org.apache.iceberg.SortOrder
- All Implemented Interfaces:
- Serializable
A sort order that defines how data and delete files should be ordered in a table.
- See Also:
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic SortOrder.BuilderbuilderFor(Schema schema) Creates a newsort order builderfor the givenSchema.static voidcheckCompatibility(SortOrder sortOrder, Schema schema) booleanfields()Returns the list ofsort fieldsfor this sort orderinthashCode()booleanisSorted()Returns true if the sort order is sortedbooleanReturns true if the sort order is unsortedintorderId()Returns the ID of this sort orderbooleanChecks whether this order is equivalent to another order while ignoring the order id.booleanChecks whether this order satisfies another order.schema()Returns theSchemafor this sort ordertoString()static SortOrderunsorted()Returns a sort order for unsorted tables.
- 
Method Details- 
schemaReturns theSchemafor this sort order
- 
orderIdpublic int orderId()Returns the ID of this sort order
- 
fieldsReturns the list ofsort fieldsfor this sort order
- 
isSortedpublic boolean isSorted()Returns true if the sort order is sorted
- 
isUnsortedpublic boolean isUnsorted()Returns true if the sort order is unsorted
- 
satisfiesChecks whether this order satisfies another order.- Parameters:
- anotherSortOrder- a different sort order
- Returns:
- true if this order satisfies the given order
 
- 
sameOrderChecks whether this order is equivalent to another order while ignoring the order id.- Parameters:
- anotherSortOrder- a different sort order
- Returns:
- true if this order is equivalent to the given order
 
- 
toUnbound
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
unsortedReturns a sort order for unsorted tables.- Returns:
- an unsorted order
 
- 
builderForCreates a newsort order builderfor the givenSchema.- Parameters:
- schema- a schema
- Returns:
- a sort order builder for the given schema
 
- 
checkCompatibility
 
-