Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmorozov333 committed Jan 6, 2025
1 parent 1c331cb commit 7c18538
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ydb/core/tx/columnshard/engines/writer/buffer/actor2.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#include <ydb/library/actors/core/actor_bootstrapped.h>

#include <util/digest/numeric.h>
#include <util/generic/string_hash.h>

namespace NKikimr::NOlap::NWritingPortions {

class TAggregationId {
Expand All @@ -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<ui64>(SchemaDescription.data(), SchemaDescription.size())) {
}

bool operator==(const TAggregationId& item) const {
Expand All @@ -31,7 +35,8 @@ class TAggregationId {
}

operator size_t() const {
return 0;
return CombineHashes<ui64>(
CombineHashes<ui64>(CombineHashes<ui64>(PathId, SchemaVersion), (ui64)ModificationType), SchemaDescriptionHash);
}
};

Expand Down Expand Up @@ -96,4 +101,4 @@ class TActor: public TActorBootstrapped<TActor> {
}
};

} // namespace NKikimr::NColumnShard::NWritingPortions
} // namespace NKikimr::NOlap::NWritingPortions

0 comments on commit 7c18538

Please sign in to comment.