Class Partitions
java.lang.Object
org.apache.gravitino.rel.partitions.Partitions
The helper class for partition expressions.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic IdentityPartition
Creates an identity partition whose name will be automatically generated.static IdentityPartition
Creates an identity partition.static ListPartition
Creates a list partition.static RangePartition
Creates a range partition.
-
Field Details
-
EMPTY_PARTITIONS
An empty array of partitions.
-
-
Method Details
-
range
public static RangePartition range(String name, Literal<?> upper, Literal<?> lower, Map<String, String> properties) Creates a range partition.- Parameters:
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.- Returns:
- The created partition.
-
list
Creates a list partition.- Parameters:
name
- The name of the partition.lists
- The values of the list partition.properties
- The properties of the partition.- Returns:
- The created partition.
-
identity
public static IdentityPartition identity(String name, String[][] fieldNames, Literal<?>[] values, Map<String, String> properties) Creates an identity partition.The
values
must correspond to thefieldNames
.- Parameters:
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.- Returns:
- The created partition.
-
identity
Creates an identity partition whose name will be automatically generated.- Parameters:
fieldNames
- The field names of the identity partition.values
- The values of the identity partition.- Returns:
- The created partition.
-