Class Ordering
- java.lang.Object
-
- org.apache.flink.api.common.operators.Ordering
-
-
Constructor Summary
Constructors Constructor Description Ordering()
Creates an empty ordering.Ordering(int index, Class<? extends Comparable<?>> type, Order order)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ordering
appendOrdering(Integer index, Class<? extends Comparable<?>> type, Order order)
Extends this ordering by appending an additional order requirement.Ordering
clone()
Ordering
createNewOrderingUpToIndex(int exclusiveIndex)
Creates a new ordering the represents an ordering on a prefix of the fields.boolean
equals(Object obj)
Integer
getFieldNumber(int index)
Order[]
getFieldOrders()
int[]
getFieldPositions()
boolean[]
getFieldSortDirections()
FieldList
getInvolvedIndexes()
int
getNumberOfFields()
Order
getOrder(int index)
Class<? extends Comparable<?>>
getType(int index)
Class<? extends Comparable<?>>[]
getTypes()
boolean
groupsFields(FieldSet fields)
int
hashCode()
boolean
isMetBy(Ordering otherOrdering)
boolean
isOrderEqualOnFirstNFields(Ordering other, int n)
String
toString()
-
-
-
Constructor Detail
-
Ordering
public Ordering()
Creates an empty ordering.
-
Ordering
public Ordering(int index, Class<? extends Comparable<?>> type, Order order)
- Parameters:
index
-type
-order
-
-
-
Method Detail
-
appendOrdering
public Ordering appendOrdering(Integer index, Class<? extends Comparable<?>> type, Order order)
Extends this ordering by appending an additional order requirement. If the index has been previously appended then the unmodified Ordering is returned.- Parameters:
index
- Field index of the appended order requirement.type
- Type of the appended order requirement.order
- Order of the appended order requirement.- Returns:
- This ordering with an additional appended order requirement.
-
getNumberOfFields
public int getNumberOfFields()
-
getInvolvedIndexes
public FieldList getInvolvedIndexes()
-
getFieldNumber
public Integer getFieldNumber(int index)
-
getType
public Class<? extends Comparable<?>> getType(int index)
-
getOrder
public Order getOrder(int index)
-
getTypes
public Class<? extends Comparable<?>>[] getTypes()
-
getFieldPositions
public int[] getFieldPositions()
-
getFieldOrders
public Order[] getFieldOrders()
-
getFieldSortDirections
public boolean[] getFieldSortDirections()
-
isMetBy
public boolean isMetBy(Ordering otherOrdering)
-
isOrderEqualOnFirstNFields
public boolean isOrderEqualOnFirstNFields(Ordering other, int n)
-
createNewOrderingUpToIndex
public Ordering createNewOrderingUpToIndex(int exclusiveIndex)
Creates a new ordering the represents an ordering on a prefix of the fields. If the exclusive index up to which to create the ordering is0
, then there is no resulting ordering and this method returnnull
.- Parameters:
exclusiveIndex
- The index (exclusive) up to which to create the ordering.- Returns:
- The new ordering on the prefix of the fields, or
null
, if the prefix is empty.
-
groupsFields
public boolean groupsFields(FieldSet fields)
-
-