public class SortOrderUtil
extends java.lang.Object
Modifier and Type | Method and 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) |
public static SortOrder buildSortOrder(Schema schema, PartitionSpec spec, SortOrder sortOrder)
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.
schema
- a schemaspec
- a partition specsortOrder
- a sort orderpublic static java.util.Set<java.lang.String> orderPreservingSortedColumns(SortOrder sortOrder)