jaimeferj commented on code in PR #2561:
URL: https://github.com/apache/iceberg-python/pull/2561#discussion_r2415756674
##########
pyiceberg/expressions/__init__.py:
##########
@@ -725,12 +729,37 @@ def as_bound(self) -> Type[BoundNotIn[L]]:
return BoundNotIn[L]
-class LiteralPredicate(UnboundPredicate[L], ABC):
- literal: Literal[L]
+class LiteralPredicate(IcebergBaseModel, UnboundPredicate[L], ABC):
+ op: str = Field(
+ default="",
+ alias="type",
+ validation_alias="type",
+ serialization_alias="type",
+ repr=False,
+ )
Review Comment:
I have checked the PR and it seems he might have solved it by putting in a
default value in the type field. It does not seem to be the perfect solution
but if you prefer that over the cumbersome type and _type, I get it and will
implement it that way.
```Python
type: TypingLiteral["in", "not-in"] = Field(default="in")
```
--
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]