iceberg-python icon indicating copy to clipboard operation
iceberg-python copied to clipboard

Make And expression JSON serializable using Pydantic

Open Aniketsy opened this issue 2 months ago • 9 comments

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

Aniketsy avatar Oct 02 '25 20:10 Aniketsy

@Fokko Could you please review these changes when you have time.

Aniketsy avatar Oct 05 '25 09:10 Aniketsy

@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

Fokko avatar Oct 09 '25 19:10 Fokko

@Fokko sure, I will wait till LiteralPredicate get fixed and then continue working on this.

Aniketsy avatar Oct 10 '25 03:10 Aniketsy

@Fokko I think PR on LiteralPredicate is merged, please let me know if I can proceed on this.

Aniketsy avatar Oct 20 '25 16:10 Aniketsy

@Aniketsy Certainly, let me know if you run into anything 👍

Fokko avatar Oct 20 '25 19:10 Fokko

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

Fokko avatar Oct 20 '25 19:10 Fokko

@Aniketsy gentle ping on this :)

kevinjqliu avatar Oct 26 '25 20:10 kevinjqliu

@kevinjqliu Could you please take a look and help me understand why one of the tests is failing?

Aniketsy avatar Oct 29 '25 10:10 Aniketsy

@Aniketsy could u try apply the same fix as the OR pr #2565

kevinjqliu avatar Nov 03 '25 17:11 kevinjqliu

@Aniketsy Gentle ping!

Fokko avatar Nov 25 '25 16:11 Fokko

Closing this in favor of https://github.com/apache/iceberg-python/pull/2784

Fokko avatar Nov 26 '25 08:11 Fokko