Class AbstractRangePartitionFunction
java.lang.Object
org.apache.drill.exec.planner.physical.AbstractRangePartitionFunction
- All Implemented Interfaces:
PartitionFunction
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
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 functionabstract List<FieldReference>
Return the list of FieldReferences that participate in the partitioning functionabstract void
setup
(List<VectorWrapper<?>> partitionKeys) Setup method for the partitioning function
-
Field Details
-
RANGE_PARTITION_EXPR_NAME
- See Also:
-
-
Constructor Details
-
AbstractRangePartitionFunction
public AbstractRangePartitionFunction()
-
-
Method Details
-
getPartitionRefList
Description copied from interface:PartitionFunction
Return the list of FieldReferences that participate in the partitioning function- Specified by:
getPartitionRefList
in interfacePartitionFunction
- Returns:
- list of FieldReferences
-
setup
Description copied from interface:PartitionFunction
Setup method for the partitioning function- Specified by:
setup
in interfacePartitionFunction
- Parameters:
partitionKeys
- a list of partition columns on which range partitioning is needed
-
eval
public abstract int eval(int index, int numPartitions) Description copied from interface:PartitionFunction
Evaluate a partitioning function for a particular row index and return the partition id- Specified by:
eval
in interfacePartitionFunction
- 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
Description copied from interface:PartitionFunction
Returns a FieldReference (LogicalExpression) for the partition function- Specified by:
getPartitionFieldRef
in interfacePartitionFunction
- Returns:
- FieldReference for the partition function
-