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


##########
pyiceberg/expressions/__init__.py:
##########
@@ -39,7 +39,7 @@
     literal,
 )
 from pyiceberg.schema import Accessor, Schema
-from pyiceberg.typedef import L, StructProtocol
+from pyiceberg.typedef import L, StructProtocol, IcebergRootModel

Review Comment:
   The linter wants it alphabetically:
   ```suggestion
   from pyiceberg.typedef import IcebergRootModel, L, StructProtocol
   ```



##########
pyiceberg/expressions/__init__.py:
##########
@@ -362,8 +362,9 @@ def __getnewargs__(self) -> Tuple[BooleanExpression]:
         return (self.child,)
 
 
-class AlwaysTrue(BooleanExpression, Singleton):
+class AlwaysTrue(BooleanExpression, Singleton, IcebergRootModel):
     """TRUE expression."""
+    root: str = "true"

Review Comment:
   The linter suggests a newline:
   ```suggestion
   
       root: str = "true"
   ```



##########
pyiceberg/expressions/__init__.py:
##########
@@ -362,8 +362,9 @@ def __getnewargs__(self) -> Tuple[BooleanExpression]:
         return (self.child,)
 
 
-class AlwaysTrue(BooleanExpression, Singleton):
+class AlwaysTrue(BooleanExpression, Singleton, IcebergRootModel):

Review Comment:
   ```suggestion
   class AlwaysTrue(BooleanExpression, Singleton, IcebergRootModel[str]):
   ```



##########
pyiceberg/expressions/__init__.py:
##########
@@ -378,8 +379,9 @@ def __repr__(self) -> str:
         return "AlwaysTrue()"
 
 
-class AlwaysFalse(BooleanExpression, Singleton):
+class AlwaysFalse(BooleanExpression, Singleton, IcebergRootModel):

Review Comment:
   ```suggestion
   class AlwaysFalse(BooleanExpression, Singleton, IcebergRootModel[str]):
   ```



##########
pyiceberg/expressions/__init__.py:
##########
@@ -378,8 +379,9 @@ def __repr__(self) -> str:
         return "AlwaysTrue()"
 
 
-class AlwaysFalse(BooleanExpression, Singleton):
+class AlwaysFalse(BooleanExpression, Singleton, IcebergRootModel):
     """FALSE expression."""
+    root: str = "false"

Review Comment:
   Same here:
   ```suggestion
   
       root: str = "false"
   ```



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