tvalentyn commented on a change in pull request #12756:
URL: https://github.com/apache/beam/pull/12756#discussion_r483113006
##########
File path: sdks/python/apache_beam/transforms/stats.py
##########
@@ -192,7 +193,7 @@ def get_estimate(self):
if len(self._sample_heap) < self._sample_size:
return len(self._sample_heap)
else:
- sample_space_size = sys.maxsize - 1.0 * self._min_hash
+ sample_space_size = self._HASH_SPACE_SIZE - 1.0 * self._min_hash
Review comment:
I think we need to update the initialization of `self._min_hash`.
@Hannah-Jiang do you by chance remember what was the logic behind setting
` _HASH_SPACE_SIZE = 2.0 * sys.maxsize`
`self._min_hash = sys.maxsize` ?
Shouldn't we initialize `self._min_hash` with `self._HASH_SPACE_SIZE`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]