From 49409f557ca68ad7b299edb5e91e35552864450d Mon Sep 17 00:00:00 2001 From: katyak Date: Thu, 10 Jun 2021 12:20:54 +0300 Subject: [PATCH] ML-667: in hash calculation should be modulo instead of division --- storey/targets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storey/targets.py b/storey/targets.py index f196c131..bd0d1f8a 100644 --- a/storey/targets.py +++ b/storey/targets.py @@ -126,7 +126,7 @@ def _path_from_event(self, event): col = f'igzpart_hash{hash_into}_{col}' if isinstance(val, list): val = '.'.join(map(str, val)) - val = hash(val) / hash_into + val = hash(val) % hash_into elif is_meta: col = f'igzpart_{col}'