public class JsonTableRangePartitionFunction extends AbstractRangePartitionFunction
Modifier and Type | Field and Description |
---|---|
protected ValueVector |
partitionKeyVector |
protected List<FieldReference> |
refList |
protected List<byte[]> |
startKeys |
protected List<byte[]> |
stopKeys |
protected String |
tableName |
protected String |
userName |
RANGE_PARTITION_EXPR_NAME
Constructor and Description |
---|
JsonTableRangePartitionFunction(List<FieldReference> refList,
String tableName,
List<byte[]> startKeys,
List<byte[]> stopKeys) |
JsonTableRangePartitionFunction(List<FieldReference> refList,
String tableName,
String userName,
MapRDBFormatPlugin formatPlugin) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
eval(int index,
int numPartitions)
Evaluate a partitioning function for a particular row index and return the partition id
|
List<FieldReference> |
getPartitionRefList()
Return the list of FieldReferences that participate in the partitioning function
|
int |
hashCode() |
void |
initialize(MapRDBFormatPlugin plugin) |
void |
setup(List<VectorWrapper<?>> partitionKeys)
Setup method for the partitioning function
|
getPartitionFieldRef
protected List<FieldReference> refList
protected String tableName
protected String userName
protected ValueVector partitionKeyVector
protected List<byte[]> startKeys
protected List<byte[]> stopKeys
public JsonTableRangePartitionFunction(List<FieldReference> refList, String tableName, List<byte[]> startKeys, List<byte[]> stopKeys)
public JsonTableRangePartitionFunction(List<FieldReference> refList, String tableName, String userName, MapRDBFormatPlugin formatPlugin)
public List<FieldReference> getPartitionRefList()
PartitionFunction
getPartitionRefList
in interface PartitionFunction
getPartitionRefList
in class AbstractRangePartitionFunction
public void setup(List<VectorWrapper<?>> partitionKeys)
PartitionFunction
setup
in interface PartitionFunction
setup
in class AbstractRangePartitionFunction
partitionKeys
- a list of partition columns on which range partitioning is neededpublic int eval(int index, int numPartitions)
PartitionFunction
eval
in interface PartitionFunction
eval
in class AbstractRangePartitionFunction
index
- the integer index into the partition keys vector for a specific 'row' of valuesnumPartitions
- the max number of partitions that are allowedpublic void initialize(MapRDBFormatPlugin plugin)
Copyright © 1970 The Apache Software Foundation. All rights reserved.