rdblue commented on code in PR #6141: URL: https://github.com/apache/iceberg/pull/6141#discussion_r1019379366
########## python/pyiceberg/expressions/literals.py: ########## @@ -58,25 +60,25 @@ timestamp_to_micros, timestamptz_to_micros, ) -from pyiceberg.utils.singleton import Singleton T = TypeVar("T") class Literal(Generic[T], ABC): """Literal which has a value and can be converted between types""" - def __init__(self, value: T, value_type: type): + def __init__(self, value: T, value_type: Type): if value is None or not isinstance(value, value_type): raise TypeError(f"Invalid literal value: {value} (not a {value_type})") self._value = value @property def value(self) -> T: - return self._value # type: ignore + return self._value + @singledispatchmethod @abstractmethod - def to(self, type_var) -> Literal: + def to(self, type_var: IcebergType) -> Literal: Review Comment: I think AboveMax and BelowMin should be special literals. That works. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org