diff options
author | chertus <azuikov@ydb.tech> | 2023-03-03 12:07:36 +0300 |
---|---|---|
committer | chertus <azuikov@ydb.tech> | 2023-03-03 12:07:36 +0300 |
commit | 1700b34aae50b8aea35eaebc80215aad94e67124 (patch) | |
tree | 3a921891da017d2a5ce086832ac2f420fefc91ac | |
parent | 6c4279de8b9fcd286ed33e03d89c857dad6e6272 (diff) | |
download | ydb-1700b34aae50b8aea35eaebc80215aad94e67124.tar.gz |
replace map with set in ReadMetadata
-rw-r--r-- | ydb/core/tx/columnshard/columnshard_impl.cpp | 10 | ||||
-rw-r--r-- | ydb/core/tx/columnshard/engines/indexed_read_data.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ydb/core/tx/columnshard/columnshard_impl.cpp b/ydb/core/tx/columnshard/columnshard_impl.cpp index f585262173c..80c3fc5f815 100644 --- a/ydb/core/tx/columnshard/columnshard_impl.cpp +++ b/ydb/core/tx/columnshard/columnshard_impl.cpp @@ -1029,18 +1029,18 @@ void TColumnShard::MapExternBlobs(const TActorContext& /*ctx*/, NOlap::TReadMeta } } - THashMap<TUnifiedBlobId, TUnifiedBlobId> extMap; + auto exported = std::make_shared<THashSet<TUnifiedBlobId>>(); for (auto& blobId : uniqBlobs) { TEvictMetadata meta; auto evicted = BlobManager->GetEvicted(blobId, meta); - if (evicted.ExternBlob.IsValid()) { - extMap[blobId] = evicted.ExternBlob; + if (evicted.IsExternal()) { + exported->insert(blobId); } } - if (!extMap.empty()) { - metadata.ExternBlobs = std::make_shared<const THashMap<TUnifiedBlobId, TUnifiedBlobId>>(std::move(extMap)); + if (!exported->empty()) { + metadata.ExternBlobs = exported; } } diff --git a/ydb/core/tx/columnshard/engines/indexed_read_data.h b/ydb/core/tx/columnshard/engines/indexed_read_data.h index 54cc70ac9cb..92d5278950a 100644 --- a/ydb/core/tx/columnshard/engines/indexed_read_data.h +++ b/ydb/core/tx/columnshard/engines/indexed_read_data.h @@ -48,7 +48,7 @@ struct TReadMetadataBase { std::shared_ptr<arrow::Schema> LoadSchema; // ResultSchema + required for intermediate operations std::shared_ptr<arrow::Schema> ResultSchema; // TODO: add Program modifications std::shared_ptr<NSsa::TProgram> Program; - std::shared_ptr<const THashMap<TUnifiedBlobId, TUnifiedBlobId>> ExternBlobs; // DS -> S3 map TODO: move out of base + std::shared_ptr<const THashSet<TUnifiedBlobId>> ExternBlobs; ESorting Sorting{ESorting::ASC}; // Sorting inside returned batches ui64 Limit{0}; // TODO |