Skip to content

Commit 536e2b8

Browse files
committed
Make And expression JSON serializable using Pydantic
1 parent 59674ec commit 536e2b8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pyiceberg/expressions/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,7 @@ def __new__(cls, left: BooleanExpression, right: BooleanExpression, *rest: Boole
272272
elif right is AlwaysTrue():
273273
return left
274274
else:
275-
obj = super().__new__(cls)
276-
obj.left = left
277-
obj.right = right
278-
return obj
275+
return cls(left=left, right=right)
279276

280277
def __eq__(self, other: Any) -> bool:
281278
"""Return the equality of two instances of the And class."""

0 commit comments

Comments
 (0)