public class Partitions
extends java.lang.Object
Constructor and Description |
---|
Partitions() |
Modifier and Type | Method and Description |
---|---|
static Partition |
identity(java.lang.String[][] fieldNames,
Literal<?>[] values)
Creates an identity partition whose name will be automatically generated.
|
static Partition |
identity(java.lang.String name,
java.lang.String[][] fieldNames,
Literal<?>[] values,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates an identity partition.
|
static Partition |
list(java.lang.String name,
Literal<?>[][] lists,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a list partition.
|
static Partition |
range(java.lang.String name,
Literal<?> upper,
Literal<?> lower,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a range partition.
|
public static Partition range(java.lang.String name, Literal<?> upper, Literal<?> lower, java.util.Map<java.lang.String,java.lang.String> properties)
name
- The name of the partition.upper
- The upper bound of the partition.lower
- The lower bound of the partition.properties
- The properties of the partition.public static Partition list(java.lang.String name, Literal<?>[][] lists, java.util.Map<java.lang.String,java.lang.String> properties)
Each list in the lists must have the same length. The values in each list must correspond to
the field definitions in the Transforms.ListTransform#fieldNames()
.
name
- The name of the partition.lists
- The values of the list partition.properties
- The properties of the partition.public static Partition identity(java.lang.String name, java.lang.String[][] fieldNames, Literal<?>[] values, java.util.Map<java.lang.String,java.lang.String> properties)
The values
must correspond to the fieldNames
.
name
- The name of the partition.fieldNames
- The field names of the identity partition.values
- The value of the identity partition.properties
- The properties of the partition.public static Partition identity(java.lang.String[][] fieldNames, Literal<?>[] values)
fieldNames
- The field names of the identity partition.values
- The values of the identity partition.