public class SortInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_COMPARATOR |
static String |
SORTED_COLUMN_DELIMITER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(String[] sortcolumns,
String comparator)
Check if the two SortInfo objects are equal
|
String |
getComparator()
Get the comparator name
|
String[] |
getSortColumnNames()
Get an array of the sorted column names with the first column
being the primary sort key, the second column being the
secondary sort key, ..., etc.
|
ColumnType[] |
getSortColumnTypes()
Get an array of zebra types of the sorted columns with the first column
being the primary sort key, the second column being the
secondary sort key, ..., etc.
|
int[] |
getSortIndices()
Get an array of column indices in schema of the sorted columns with the first column
being the primary sort key, the second column being the
secondary sort key, ..., etc.
|
static SortInfo |
parse(String sortStr,
Schema schema,
String comparator)
Build a SortInfo object from sort column names, schema, and comparator
|
int |
size()
Get the number of sorted columns
|
static String |
toSortString(String[] names)
Build a string of comma-separated sort column names from an array of sort column names
|
public static final String DEFAULT_COMPARATOR
public static final String SORTED_COLUMN_DELIMITER
public String[] getSortColumnNames()
public ColumnType[] getSortColumnTypes()
public int[] getSortIndices()
public int size()
public String getComparator()
public boolean equals(String[] sortcolumns, String comparator) throws IOException
IOExceptionpublic static SortInfo parse(String sortStr, Schema schema, String comparator) throws IOException
sortStr - comma-separated sort column namesschema - schema of the Zebra table for the sort columnscomparator - comparator nameIOExceptionCopyright © 2007-2012 The Apache Software Foundation