Skip to content

Commit 5909a74

Browse files
authored
Revert "Fix hash spreading in HashPartitionConsumer (#4364)" (#8980)
1 parent ac22cb5 commit 5909a74

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

ydb/library/yql/dq/runtime/dq_output_consumer.cpp

-15
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ using namespace NKikimr;
2121
using namespace NMiniKQL;
2222
using namespace NUdf;
2323

24-
inline ui64 SpreadHash(ui64 hash) {
25-
// https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/
26-
return ((unsigned __int128)hash * 11400714819323198485llu) >> 64;
27-
}
28-
2924

3025
class TDqOutputMultiConsumer : public IDqOutputConsumer {
3126
public:
@@ -195,9 +190,6 @@ class TDqOutputHashPartitionConsumer : public IDqOutputConsumer {
195190
hash = CombineHashes(hash, HashColumn(keyId, columnValue));
196191
}
197192

198-
199-
hash = SpreadHash(hash);
200-
201193
return hash % Outputs.size();
202194
}
203195

@@ -209,8 +201,6 @@ class TDqOutputHashPartitionConsumer : public IDqOutputConsumer {
209201
hash = CombineHashes(hash, HashColumn(keyId, values[KeyColumns[keyId].Index]));
210202
}
211203

212-
hash = SpreadHash(hash);
213-
214204
return hash % Outputs.size();
215205
}
216206

@@ -314,8 +304,6 @@ class TDqOutputHashPartitionConsumerScalar : public IDqOutputConsumer {
314304
hash = CombineHashes(hash, HashColumn(keyId, values[KeyColumns_[keyId].Index]));
315305
}
316306

317-
hash = SpreadHash(hash);
318-
319307
return hash % Outputs_.size();
320308
}
321309

@@ -513,9 +501,6 @@ class TDqOutputHashPartitionConsumerBlock : public IDqOutputConsumer {
513501
}
514502
hash = CombineHashes(hash, keyHash);
515503
}
516-
517-
hash = SpreadHash(hash);
518-
519504
return hash % Outputs_.size();
520505
}
521506

0 commit comments

Comments
 (0)