Skip to content

Commit

Permalink
Revert "Fix hash spreading in HashPartitionConsumer (#4364)" (#8753)
Browse files Browse the repository at this point in the history
  • Loading branch information
gridnevvvit authored Sep 5, 2024
1 parent 446ea4d commit fe3a015
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ydb/library/yql/dq/runtime/dq_output_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ using namespace NKikimr;
using namespace NMiniKQL;
using namespace NUdf;

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


class TDqOutputMultiConsumer : public IDqOutputConsumer {
public:
Expand Down Expand Up @@ -195,9 +190,6 @@ class TDqOutputHashPartitionConsumer : public IDqOutputConsumer {
hash = CombineHashes(hash, HashColumn(keyId, columnValue));
}


hash = SpreadHash(hash);

return hash % Outputs.size();
}

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

hash = SpreadHash(hash);

return hash % Outputs.size();
}

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

hash = SpreadHash(hash);

return hash % Outputs_.size();
}

Expand Down Expand Up @@ -513,9 +501,6 @@ class TDqOutputHashPartitionConsumerBlock : public IDqOutputConsumer {
}
hash = CombineHashes(hash, keyHash);
}

hash = SpreadHash(hash);

return hash % Outputs_.size();
}

Expand Down

0 comments on commit fe3a015

Please sign in to comment.