You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "nathanbijleveld (via GitHub)" <gi...@apache.org> on 2025/09/26 13:59:32 UTC

[PR] Serialize true false [iceberg-python]

nathanbijleveld opened a new pull request, #2538:
URL: https://github.com/apache/iceberg-python/pull/2538

   <!--
   Thanks for opening a pull request!
   -->
   
   <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
   Closes #2521
   
   # Rationale for this change
   Make true/false expression serializable
   
   ## Are these changes tested?
   yes
   
   ## Are there any user-facing changes?
   
   <!-- In the case of user-facing changes, please add the changelog label. -->
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Serialize true false [iceberg-python]

Posted by "nathanbijleveld (via GitHub)" <gi...@apache.org>.
nathanbijleveld commented on PR #2538:
URL: https://github.com/apache/iceberg-python/pull/2538#issuecomment-3360283913

   <img width="697" height="244" alt="Screenshot 2025-10-02 at 12 04 15" src="https://github.com/user-attachments/assets/3551ccfa-b578-44c1-9d47-f74d6dcde6c5" />
   
   Fixed all linting issues


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Serialize true false [iceberg-python]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #2538:
URL: https://github.com/apache/iceberg-python/pull/2538


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Serialize true false [iceberg-python]

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org