CircArgs commented on code in PR #5258:
URL: https://github.com/apache/iceberg/pull/5258#discussion_r927868382
##########
python/pyiceberg/expressions/base.py:
##########
@@ -327,6 +347,54 @@ def bind(self, schema: Schema, case_sensitive: bool) ->
BoundIn[T]:
return BoundIn(bound_ref, tuple(lit.to(bound_ref.field.field_type) for
lit in self.literals)) # type: ignore
+@dataclass(frozen=True)
+class BoundEQ(BoundPredicate[T]):
+ def __invert__(self):
+ raise TypeError("EQ expressions do not support negation.")
+
+
+@dataclass(frozen=True)
+class EQ(UnboundPredicate[T]):
+ def __invert__(self):
+ raise TypeError("EQ expressions do not support negation.")
+
+ def bind(self, schema: Schema, case_sensitive: bool) -> BoundEQ[T]:
+ bound_ref = self.term.bind(schema, case_sensitive)
+ return BoundEQ(bound_ref,
self.literals[0].to(bound_ref.field.field_type)) # type: ignore
+
+
+@dataclass(frozen=True)
+class BoundLT(BoundPredicate[T]):
+ def __invert__(self):
+ raise TypeError("LT expressions do not support negation.")
+
+
+@dataclass(frozen=True)
+class LT(UnboundPredicate[T]):
Review Comment:
still open to this. currently changed to `Lt` and the like
--
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]