apilloud commented on a change in pull request #15912:
URL: https://github.com/apache/beam/pull/15912#discussion_r744024480
##########
File path: sdks/python/apache_beam/transforms/util.py
##########
@@ -725,7 +725,7 @@ class Reshuffle(PTransform):
"""
# We use 32-bit integer as the default number of buckets.
- _DEFAULT_NUM_BUCKETS = 1 << 32
+ _DEFAULT_NUM_BUCKETS = (1 << 32) - 1
Review comment:
From a chat discussion, I think either of these are equivalent:
`randint(0, (1 << 32) - 2)` or `randrange(0, (1 << 32)-1)`
`randint(0, (1 << 32) - 2)` -> `randrange(0, (1 << 32)-1)` ->
`_randbelow((1<<32)-1)` -> `getrandbits(32)`
--
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]