Fokko commented on code in PR #4324:
URL: https://github.com/apache/iceberg-python/pull/4324#discussion_r4529457726
##########
pyiceberg/manifest.py:
##########
@@ -736,6 +736,12 @@ def update(self, value: Any) -> None:
else:
self._max = max(self._max, value)
self._min = min(self._min, value)
+ if isinstance(value, float) and value == 0.0:
+ # min and max keep whichever zero came first, but bounds
must order -0.0 below 0.0
+ if math.copysign(1.0, value) < 0 and self._min == 0.0:
+ self._min = value
+ elif math.copysign(1.0, value) > 0 and self._max == 0.0:
+ self._max = value
Review Comment:
Reposting as a thread reply — the previous attempt landed top-level. (Please
ignore this one, see above.)
--
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]