hcrosse commented on code in PR #4281:
URL: https://github.com/apache/iceberg-python/pull/4281#discussion_r4462674364
##########
pyiceberg/typedef.py:
##########
@@ -196,8 +201,19 @@ def __getitem__(self, pos: int) -> Any:
return self._data[pos]
def __eq__(self, other: Any) -> bool:
- """Return the equality of two instances of the Record class."""
- return self._data == other._data if isinstance(other, Record) else
False
+ """Compare records, treating NaN floats at the same position as
equal."""
+ if not isinstance(other, Record):
+ return False
+ if self._data == other._data:
+ return True
+ if len(self._data) != len(other._data):
+ return False
+ for a, b in zip(self._data, other._data, strict=True):
Review Comment:
This comes from the commit this PR includes from
https://github.com/apache/iceberg-python/pull/4280 and is fixed there. This PR
picks up the fix when it merges `main` after that PR lands.
--
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]