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 f75d0100cf2..8473277b6b3 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/identity_partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/identity_partition.py @@ -17,7 +17,10 @@ from abc import abstractmethod from typing import List, Any + from .partition import Partition +from ..literals.literal import Literal + class IdentityPartition(Partition): """ @@ -41,9 +44,9 @@ def field_names(self) -> List[List[str]]: pass @abstractmethod - def values(self) -> List[Any]: + def values(self) -> List[Literal[Any]]: """ Returns: - List[Any]: The values of the identity partition. + List[Literal[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 6f29ab324b4..2d5e2cc827b 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/list_partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/list_partition.py @@ -18,8 +18,10 @@ from abc import abstractmethod from typing import List, Any +from gravitino.api.expressions.literals.literal import Literal from gravitino.api.expressions.partitions.partition import Partition + class ListPartition(Partition): """ A list partition represents a result of list partitioning. For example, for list partition @@ -35,9 +37,9 @@ class ListPartition(Partition): """ @abstractmethod - def lists(self) -> List[List[Any]]: + def lists(self) -> List[List[Literal[Any]]]: """ Returns: - List[List[Any]]: The values of the list partition. + List[List[Literal[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 e46e538a7fa..5d36eec202c 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/partition.py @@ -18,6 +18,7 @@ from abc import ABC, abstractmethod from typing import Dict + class Partition(ABC): """ A partition represents a result of partitioning a table. The partition can be either a 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 ff042e9226d..c3936c75d12 100644 --- a/clients/client-python/gravitino/api/expressions/partitions/range_partition.py +++ b/clients/client-python/gravitino/api/expressions/partitions/range_partition.py @@ -21,6 +21,7 @@ from gravitino.api.expressions.literals.literal import Literal from gravitino.api.expressions.partitions.partition import Partition + class RangePartition(Partition): """ A range partition represents a result of range partitioning. For example, for range partition