Skip to content

Commit e047167

Browse files
AniketsyFokko
andauthored
Update pyiceberg/expressions/__init__.py
Co-authored-by: Fokko Driesprong <[email protected]>
1 parent 26c832d commit e047167

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pyiceberg/expressions/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ def __init__(self, term: Union[str, UnboundTerm[Any]]):
456456
unbound = _to_unbound_term(term)
457457
super().__init__(term=unbound)
458458

459+
def __str__(self) -> str:
460+
"""Return the string representation of the UnaryPredicate class."""
461+
# Sort to make it deterministic
462+
return f"{str(self.__class__.__name__)}(term={str(self.term)})"
463+
459464
def bind(self, schema: Schema, case_sensitive: bool = True) -> BoundUnaryPredicate[Any]:
460465
bound_term = self.term.bind(schema, case_sensitive)
461466
return self.as_bound(bound_term)

0 commit comments

Comments
 (0)