diff --git a/clients/client-python/gravitino/api/expressions/partitions/identity_partition.py b/clients/client-python/gravitino/api/expressions/partitions/identity_partition.py index b0a9354ec4c..f75d0100cf2 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/identity_partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/identity_partition.py @@ -30,15 +30,11 @@ class IdentityPartition(Partition): its partition name is "dt=2008-08-08/country=us", field names are [["dt"], ["country"]] and values are ["2008-08-08", "us"]. - - This class is evolving and may change in future versions. """ @abstractmethod def field_names(self) -> List[List[str]]: """ - Returns the field names of the identity partition. - Returns: List[List[str]]: A list of lists representing the field names of the identity partition. """ @@ -47,10 +43,7 @@ def field_names(self) -> List[List[str]]: @abstractmethod def values(self) -> List[Any]: """ - Returns the values of the identity partition. The values are in the same order as the field - names. - Returns: - List[Any]: A list representing the values of the identity partition. + List[Any]: The values of the identity partition. """ pass diff --git a/clients/client-python/gravitino/api/expressions/partitions/list_partition.py b/clients/client-python/gravitino/api/expressions/partitions/list_partition.py index e1b43e41fa8..6f29ab324b4 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/list_partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/list_partition.py @@ -17,7 +17,8 @@ from abc import abstractmethod from typing import List, Any -from .partition import Partition + +from gravitino.api.expressions.partitions.partition import Partition class ListPartition(Partition): """ @@ -31,16 +32,12 @@ class ListPartition(Partition): ``` its name is "p202204_California" and lists are [["2022-04-01","Los Angeles"], ["2022-04-01", "San Francisco"]]. - - This class is evolving and may change in future versions. """ @abstractmethod def lists(self) -> List[List[Any]]: """ - Returns the values of the list partition. - Returns: - List[List[Any]]: A list of lists representing the values of the list partition. + List[List[Any]]: The values of the list partition. """ pass diff --git a/clients/client-python/gravitino/api/expressions/partitions/partition.py b/clients/client-python/gravitino/api/expressions/partitions/partition.py index faa51c79959..e46e538a7fa 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/partition.py @@ -22,15 +22,11 @@ class Partition(ABC): """ A partition represents a result of partitioning a table. The partition can be either a `IdentityPartition`, `ListPartition`, or `RangePartition`. It depends on the `Table.partitioning()`. - - This class is evolving and may change in future versions. """ @abstractmethod def name(self) -> str: """ - Returns the name of the partition. - Returns: str: The name of the partition. """ @@ -39,9 +35,7 @@ def name(self) -> str: @abstractmethod def properties(self) -> Dict[str, str]: """ - Returns the properties of the partition, such as statistics, location, etc. - Returns: - Dict[str, str]: A dictionary containing the properties of the partition. + Dict[str, str]: The properties of the partition, such as statistics, location, etc. """ pass diff --git a/clients/client-python/gravitino/api/expressions/partitions/range_partition.py b/clients/client-python/gravitino/api/expressions/partitions/range_partition.py index a423f6a707d..ff042e9226d 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/range_partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/range_partition.py @@ -16,9 +16,10 @@ # under the License. from abc import abstractmethod -from typing import Optional -from .partition import Partition -from .literal import Literal +from typing import Any + +from gravitino.api.expressions.literals.literal import Literal +from gravitino.api.expressions.partitions.partition import Partition class RangePartition(Partition): """ @@ -29,24 +30,20 @@ class RangePartition(Partition): ``` its upper bound is "2020-03-22" and its lower bound is null. - - This class is evolving and may change in future versions. """ @abstractmethod - def upper(self) -> Optional[Literal]: + def upper(self) -> Literal[Any]: """ Returns: - Optional[Literal]: The upper bound of the partition, or None if there is no upper bound. + Literal[Any]: The upper bound of the partition. """ pass @abstractmethod - def lower(self) -> Optional[Literal]: + def lower(self) -> Literal[Any]: """ - Returns the lower bound of the partition. - Returns: - Optional[Literal]: The lower bound of the partition, or None if there is no lower bound. + Literal[Any]: The lower bound of the partition. """ pass