You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Aniketsy (via GitHub)" <gi...@apache.org> on 2025/10/02 20:26:48 UTC
[PR] Make And expression JSON serializable using Pydantic [iceberg-python]
Aniketsy opened a new pull request, #2560:
URL: https://github.com/apache/iceberg-python/pull/2560
#2518
This PR addresses issue by making the `And` expression in pyiceberg.expressions fully JSON serializable using Pydantic.
- Added a unit test to verify correct JSON serialization of the And expression.
Please let me know if my approach or fix needs any improvements . Iām open to feedback and happy to make changes based on suggestions.
Thank you !
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3576606558
@Aniketsy Gentle ping!
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Aniketsy (via GitHub)" <gi...@apache.org>.
Aniketsy commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3388182921
@Fokko sure, I will wait till `LiteralPredicate` get fixed and then continue working on this.
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Aniketsy (via GitHub)" <gi...@apache.org>.
Aniketsy commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3460724453
@kevinjqliu Could you please take a look and help me understand why one of the tests is failing?
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#discussion_r2445952163
##########
pyiceberg/expressions/__init__.py:
##########
@@ -247,9 +249,10 @@ def as_bound(self) -> Type[BoundReference[L]]:
return BoundReference[L]
-class And(BooleanExpression):
+class And(BooleanExpression, IcebergBaseModel):
Review Comment:
I think Pydantic requires the BaseModel to be the first class to be inherited.
```suggestion
class And(IcebergBaseModel, BooleanExpression):
```
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3423495341
@Aniketsy Certainly, let me know if you run into anything š
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko closed pull request #2560: Make And expression JSON serializable using Pydantic
URL: https://github.com/apache/iceberg-python/pull/2560
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3387180161
@Aniketsy Thanks for working on this, but I think this one is problematic, since it relies on `BooleanExpression`. I think we need to fix the `LiteralPredicate` first
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3481572813
@Aniketsy could u try apply the same fix as the `OR` pr #2565
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3423500602
I would recommend taking some inspiration from the `Or` operator: https://github.com/apache/iceberg-python/pull/2565 It can be pretty tricky with the `__new__` method being overridden
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3580083842
Closing this in favor of https://github.com/apache/iceberg-python/pull/2784
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Aniketsy (via GitHub)" <gi...@apache.org>.
Aniketsy commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3422975539
@Fokko I think PR on `LiteralPredicate` is merged, please let me know if I can proceed on this.
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "Aniketsy (via GitHub)" <gi...@apache.org>.
Aniketsy commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3368884995
@Fokko Could you please review these changes when you have time.
--
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] Make And expression JSON serializable using Pydantic [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #2560:
URL: https://github.com/apache/iceberg-python/pull/2560#issuecomment-3448917168
@Aniketsy gentle ping on this :)
--
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