rdblue commented on code in PR #5258:
URL: https://github.com/apache/iceberg/pull/5258#discussion_r929222844
##########
python/pyiceberg/expressions/base.py:
##########
@@ -209,14 +265,14 @@ def right(self) -> BooleanExpression:
def __eq__(self, other) -> bool:
return id(self) == id(other) or (isinstance(other, And) and self.left
== other.left and self.right == other.right)
- def __invert__(self) -> "Or":
+ def __invert__(self) -> Or:
return Or(~self.left, ~self.right)
def __repr__(self) -> str:
return f"And({repr(self.left)}, {repr(self.right)})"
def __str__(self) -> str:
- return f"({self.left} and {self.right})"
+ return f"And({str(self.left)}, {str(self.right)})"
Review Comment:
I don't think this is correct. This is basically just `repr` output. I think
this should match what Java produces, which is a readable infix string.
--
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]