public class RelCollations
extends java.lang.Object
RelCollation
and RelFieldCollation
.Modifier and Type | Field and Description |
---|---|
static RelCollation |
EMPTY
A collation indicating that a relation is not sorted.
|
static RelCollation |
PRESERVE
Deprecated.
|
Modifier | Constructor and Description |
---|---|
private |
RelCollations() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(java.util.List<RelCollation> collations,
ImmutableIntList keys)
Returns whether one of a list of collations indicates that the collection
is sorted on the given list of keys.
|
static boolean |
contains(RelCollation collation,
java.lang.Iterable<java.lang.Integer> keys)
Returns whether a collation indicates that the collection is sorted on
a given list of keys.
|
private static boolean |
contains(RelCollation collation,
java.util.List<java.lang.Integer> keys) |
static java.util.List<RelCollation> |
createSingleton(int fieldIndex)
Creates a list containing one collation containing one field.
|
static boolean |
equal(java.util.List<RelCollation> collationList1,
java.util.List<RelCollation> collationList2) |
static boolean |
isValid(RelDataType rowType,
java.util.List<RelCollation> collationList,
boolean fail)
Checks that a collection of collations is valid.
|
static RelCollation |
of(int fieldIndex)
Creates a collation containing one field.
|
static RelCollation |
of(java.util.List<RelFieldCollation> fieldCollations) |
static RelCollation |
of(RelFieldCollation... fieldCollations) |
static java.util.List<java.lang.Integer> |
ordinals(java.util.List<RelFieldCollation> fieldCollations)
Returns the indexes of the fields in a list of field collations.
|
static java.util.List<java.lang.Integer> |
ordinals(RelCollation collation)
Returns the indexes of the field collations in a given collation.
|
static RelCollation |
permute(RelCollation collation,
java.util.Map<java.lang.Integer,java.lang.Integer> mapping)
Creates a copy of this collation that changes the ordinals of input
fields.
|
static RelCollation |
permute(RelCollation collation,
Mappings.TargetMapping mapping)
Creates a copy of this collation that changes the ordinals of input
fields.
|
static RelCollation |
shift(RelCollation collation,
int offset) |
public static final RelCollation EMPTY
@Deprecated public static final RelCollation PRESERVE
public static RelCollation of(RelFieldCollation... fieldCollations)
public static RelCollation of(java.util.List<RelFieldCollation> fieldCollations)
public static RelCollation of(int fieldIndex)
public static java.util.List<RelCollation> createSingleton(int fieldIndex)
public static boolean isValid(RelDataType rowType, java.util.List<RelCollation> collationList, boolean fail)
rowType
- Row type of the relational expressioncollationList
- List of collationsfail
- Whether to fail if invalidpublic static boolean equal(java.util.List<RelCollation> collationList1, java.util.List<RelCollation> collationList2)
public static java.util.List<java.lang.Integer> ordinals(RelCollation collation)
public static java.util.List<java.lang.Integer> ordinals(java.util.List<RelFieldCollation> fieldCollations)
public static boolean contains(RelCollation collation, java.lang.Iterable<java.lang.Integer> keys)
collation
- Collationkeys
- List of keysprivate static boolean contains(RelCollation collation, java.util.List<java.lang.Integer> keys)
public static boolean contains(java.util.List<RelCollation> collations, ImmutableIntList keys)
public static RelCollation shift(RelCollation collation, int offset)
public static RelCollation permute(RelCollation collation, java.util.Map<java.lang.Integer,java.lang.Integer> mapping)
public static RelCollation permute(RelCollation collation, Mappings.TargetMapping mapping)
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.