rdblue commented on code in PR #6128:
URL: https://github.com/apache/iceberg/pull/6128#discussion_r1028599283
##########
python/pyiceberg/expressions/__init__.py:
##########
@@ -601,36 +640,65 @@ def __eq__(self, other):
def __repr__(self) -> str:
return f"{str(self.__class__.__name__)}(term={repr(self.term)},
literal={repr(self.literal)})"
+ @property
+ @abstractmethod
+ def as_unbound(self) -> Type[LiteralPredicate[L]]:
+ ...
+
class BoundEqualTo(BoundLiteralPredicate[L]):
def __invert__(self) -> BoundNotEqualTo[L]:
return BoundNotEqualTo[L](self.term, self.literal)
+ @property
+ def as_unbound(self) -> Type[EqualTo[L]]:
+ return EqualTo
+
class BoundNotEqualTo(BoundLiteralPredicate[L]):
def __invert__(self) -> BoundEqualTo[L]:
return BoundEqualTo[L](self.term, self.literal)
+ @property
+ def as_unbound(self) -> Type[NotEqualTo[L]]:
+ return NotEqualTo
Review Comment:
Does this need the type param, `NotEqualTo[L]`? It looks like `GreaterThan`
has it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]