Interface PartitionFunction
- All Known Implementing Classes:
AbstractRangePartitionFunction
public interface PartitionFunction
-
Method Summary
Modifier and TypeMethodDescriptionint
eval
(int index, int numPartitions) Evaluate a partitioning function for a particular row index and return the partition idReturns a FieldReference (LogicalExpression) for the partition functionReturn the list of FieldReferences that participate in the partitioning functionvoid
setup
(List<VectorWrapper<?>> partitionKeys) Setup method for the partitioning function
-
Method Details
-
getPartitionRefList
List<FieldReference> getPartitionRefList()Return the list of FieldReferences that participate in the partitioning function- Returns:
- list of FieldReferences
-
setup
Setup method for the partitioning function- Parameters:
partitionKeys
- a list of partition columns on which range partitioning is needed
-
eval
int eval(int index, int numPartitions) Evaluate a partitioning function for a particular row index and return the partition id- Parameters:
index
- the integer index into the partition keys vector for a specific 'row' of valuesnumPartitions
- the max number of partitions that are allowed- Returns:
- partition id, an integer value
-
getPartitionFieldRef
FieldReference getPartitionFieldRef()Returns a FieldReference (LogicalExpression) for the partition function- Returns:
- FieldReference for the partition function
-