diff --git a/ydb/core/tx/columnshard/engines/writer/buffer/actor2.h b/ydb/core/tx/columnshard/engines/writer/buffer/actor2.h index a988884a3bb7..49f7c481368d 100644 --- a/ydb/core/tx/columnshard/engines/writer/buffer/actor2.h +++ b/ydb/core/tx/columnshard/engines/writer/buffer/actor2.h @@ -7,6 +7,9 @@ #include +#include +#include + namespace NKikimr::NOlap::NWritingPortions { class TAggregationId { @@ -15,14 +18,15 @@ class TAggregationId { const ui64 SchemaVersion; const NEvWrite::EModificationType ModificationType; const TString SchemaDescription; + const ui64 SchemaDescriptionHash; public: - TAggregationId(const ui64 pathId, const ui64 schemaVersion, const NEvWrite::EModificationType mType, - const TString& schemaDescription) + TAggregationId(const ui64 pathId, const ui64 schemaVersion, const NEvWrite::EModificationType mType, const TString& schemaDescription) : PathId(pathId) , SchemaVersion(schemaVersion) , ModificationType(mType) - , SchemaDescription(schemaDescription) { + , SchemaDescription(schemaDescription) + , SchemaDescriptionHash(MurmurHash(SchemaDescription.data(), SchemaDescription.size())) { } bool operator==(const TAggregationId& item) const { @@ -31,7 +35,8 @@ class TAggregationId { } operator size_t() const { - return 0; + return CombineHashes( + CombineHashes(CombineHashes(PathId, SchemaVersion), (ui64)ModificationType), SchemaDescriptionHash); } }; @@ -96,4 +101,4 @@ class TActor: public TActorBootstrapped { } }; -} // namespace NKikimr::NColumnShard::NWritingPortions +} // namespace NKikimr::NOlap::NWritingPortions