Package org.apache.iceberg.util
Class SortOrderUtil
- java.lang.Object
-
- org.apache.iceberg.util.SortOrderUtil
-
public class SortOrderUtil extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SortOrder
buildSortOrder(Schema schema, PartitionSpec spec, SortOrder sortOrder)
Build a final sort order that satisfies the clustering required by the partition spec.static SortOrder
buildSortOrder(Table table)
static SortOrder
buildSortOrder(Table table, SortOrder sortOrder)
static java.util.Set<java.lang.String>
orderPreservingSortedColumns(SortOrder sortOrder)
-
-
-
Method Detail
-
buildSortOrder
public static SortOrder buildSortOrder(Schema schema, PartitionSpec spec, SortOrder sortOrder)
Build a final sort order that satisfies the clustering required by the partition spec.The incoming sort order may or may not satisfy the clustering needed by the partition spec. This modifies the sort order so that it clusters by partition and still produces the same order within each partition.
- Parameters:
schema
- a schemaspec
- a partition specsortOrder
- a sort order- Returns:
- the sort order with additional sort fields to satisfy the clustering required by the spec
-
orderPreservingSortedColumns
public static java.util.Set<java.lang.String> orderPreservingSortedColumns(SortOrder sortOrder)
-
-