public class SortInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_COMPARATOR |
static java.lang.String |
SORTED_COLUMN_DELIMITER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.String[] sortcolumns,
java.lang.String comparator)
Check if the two SortInfo objects are equal
|
java.lang.String |
getComparator()
Get the comparator name
|
java.lang.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(java.lang.String sortStr,
Schema schema,
java.lang.String comparator)
Build a SortInfo object from sort column names, schema, and comparator
|
int |
size()
Get the number of sorted columns
|
static java.lang.String |
toSortString(java.lang.String[] names)
Build a string of comma-separated sort column names from an array of sort column names
|
public static final java.lang.String DEFAULT_COMPARATOR
public static final java.lang.String SORTED_COLUMN_DELIMITER
public java.lang.String[] getSortColumnNames()
public ColumnType[] getSortColumnTypes()
public int[] getSortIndices()
public int size()
public java.lang.String getComparator()
public boolean equals(java.lang.String[] sortcolumns, java.lang.String comparator) throws java.io.IOException
java.io.IOException
public static SortInfo parse(java.lang.String sortStr, Schema schema, java.lang.String comparator) throws java.io.IOException
sortStr
- comma-separated sort column namesschema
- schema of the Zebra table for the sort columnscomparator
- comparator namejava.io.IOException
public static java.lang.String toSortString(java.lang.String[] names)
names
- an array of sort column namesCopyright © 2007-2012 The Apache Software Foundation