gravitino.api.rel.partitions.partitions.Partitions¶
- class gravitino.api.rel.partitions.partitions.Partitions¶
Bases:
objectThe helper class for partition expressions.
- __init__()¶
Methods
__init__()identity(name, field_names, values[, properties])Creates an identity partition.
list(name, lists, properties)Creates a list partition.
range(name, upper, lower, properties)Creates a range partition.
Attributes
An empty array of partitions
- static identity(name: str | None, field_names: List[List[str]], values: List[Literal[Any]], properties: Dict[str, str] | None = None) IdentityPartition¶
Creates an identity partition.
The values must correspond to the field_names.
- Args:
name: The name of the partition. field_names: The field names of the identity partition. values: The value of the identity partition. properties: The properties of the partition.
- Returns:
The created partition.
- static list(name: str, lists: List[List[Literal[Any]]], properties: Dict[str, str] | None) ListPartition¶
Creates a list partition.
- Args:
name: The name of the partition. lists: The values of the list partition. properties: The properties of the partition.
- Returns:
The created partition.
- static range(name: str, upper: Literal[Any], lower: Literal[Any], properties: Dict[str, str] | None) RangePartition¶
Creates a range partition.
- Args:
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.