Fokko commented on code in PR #2557:
URL: https://github.com/apache/iceberg-python/pull/2557#discussion_r2397330723


##########
pyiceberg/expressions/__init__.py:
##########
@@ -559,12 +561,19 @@ def as_bound(self) -> Type[BoundNotNaN[L]]:
         return BoundNotNaN[L]
 
 
-class SetPredicate(UnboundPredicate[L], ABC):
-    literals: Set[Literal[L]]
+class SetPredicate(UnboundPredicate[L], IcebergBaseModel, ABC):
+    type: str = Field(default="in", alias="type")

Review Comment:
   I think we can use [`Literal`](https://peps.python.org/pep-0586/) here:
   ```suggestion
       type: Literal["in"] = Field(default="in", alias="type")
   ```
   The only acceptable value is `in` for this predicate



##########
pyiceberg/expressions/__init__.py:
##########
@@ -676,6 +685,8 @@ def as_unbound(self) -> Type[NotIn[L]]:
 
 
 class In(SetPredicate[L]):
+    type: str = Field(default="in", alias="type")

Review Comment:
   I think we can use [`Literal`](https://peps.python.org/pep-0586/) here:
   ```suggestion
       type: Literal["in"] = Field(default="in", alias="type")
   ```
   The only acceptable value is `in` for this predicate



-- 
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]

Reply via email to