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


##########
tests/expressions/test_expressions.py:
##########
@@ -702,6 +702,10 @@ def test_or() -> None:
     # Some syntactic sugar
     assert or_ == null | nan
 
+    assert (
+        or_.model_dump_json()
+        == 
'{"type":"or","left":"IsNull(term=Reference(name=\'a\'))","right":"IsNaN(term=Reference(name=\'b\'))"}'

Review Comment:
   I think if you replace it with `EqualTo("a", 10)` then it should produce a 
valid JSON encoded expression. On top of that, we can also remove these: 
https://github.com/apache/iceberg-python/pull/2565/files#diff-4d0ae566a5a0bf0ceba68c8119e95c3d2d71d92e70e0dd9b48589d3379c7f1caR331-R341
   
   These will override the serializer when it encounters a non-Pydantic object 
in left/right.



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