Skip to content

Commit 13f82ae

Browse files
committed
Revert "Fix hash spreading in HashPartitionConsumer (ydb-platform#4364)"
This reverts commit caeb030.
1 parent caeb030 commit 13f82ae

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
@@ -27,11 +27,6 @@ using namespace NKikimr;
2727
using namespace NMiniKQL;
2828
using namespace NUdf;
2929

30-
inline ui64 SpreadHash(ui64 hash) {
31-
// https://probablydance.com/2018/06/16/fibonacci-hashing-the-optimization-that-the-world-forgot-or-a-better-alternative-to-integer-modulo/
32-
return ((unsigned __int128)hash * 11400714819323198485llu) >> 64;
33-
}
34-
3530

3631
class TDqOutputMultiConsumer : public IDqOutputConsumer {
3732
public:
@@ -326,9 +321,6 @@ class TDqOutputHashPartitionConsumer : public IDqOutputConsumer {
326321
hash = CombineHashes(hash, HashColumn(keyId, columnValue));
327322
}
328323

329-
330-
hash = SpreadHash(hash);
331-
332324
return hash % Outputs.size();
333325
}
334326

@@ -341,8 +333,6 @@ class TDqOutputHashPartitionConsumer : public IDqOutputConsumer {
341333
hash = CombineHashes(hash, HashColumn(keyId, values[KeyColumns[keyId].Index]));
342334
}
343335

344-
hash = SpreadHash(hash);
345-
346336
return hash % Outputs.size();
347337
}
348338
////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -480,8 +470,6 @@ class TDqOutputHashPartitionConsumerScalar : public IDqOutputConsumer {
480470
hash = CombineHashes(hash, HashColumn(keyId, values[KeyColumns_[keyId].Index]));
481471
}
482472

483-
hash = SpreadHash(hash);
484-
485473
return hash % Outputs_.size();
486474
}
487475

@@ -695,9 +683,6 @@ class TDqOutputHashPartitionConsumerBlock : public IDqOutputConsumer {
695683
}
696684
hash = CombineHashes(hash, keyHash);
697685
}
698-
699-
hash = SpreadHash(hash);
700-
701686
return hash % Outputs_.size();
702687
}
703688

0 commit comments

Comments
 (0)