diff options
author | ivanmorozov <ivanmorozov@ydb.tech> | 2023-12-06 19:32:52 +0300 |
---|---|---|
committer | ivanmorozov <ivanmorozov@ydb.tech> | 2023-12-06 22:07:00 +0300 |
commit | cc61b513d4bade8fa55770246d3563f630753ed9 (patch) | |
tree | be478bdcf9cbeb72aba3fec2fae9fa8188efff0b | |
parent | 2289a054c72274fd4d96313370a62b92da5758cd (diff) | |
download | ydb-cc61b513d4bade8fa55770246d3563f630753ed9.tar.gz |
fix columns save/load info reading from proto
3 files changed, 7 insertions, 8 deletions
diff --git a/ydb/core/tx/columnshard/engines/changes/general_compaction.cpp b/ydb/core/tx/columnshard/engines/changes/general_compaction.cpp index 2c82f8c920..ee366caf0f 100644 --- a/ydb/core/tx/columnshard/engines/changes/general_compaction.cpp +++ b/ydb/core/tx/columnshard/engines/changes/general_compaction.cpp @@ -85,8 +85,6 @@ TConclusionStatus TGeneralCompactColumnEngineChanges::DoConstructBlobs(TConstruc std::vector<std::map<ui32, std::vector<TColumnPortionResult>>> chunkGroups; chunkGroups.resize(batchResults.size()); -// Cerr << context.SchemaVersions.DebugString() << Endl; - for (auto&& columnId : resultSchema->GetIndexInfo().GetColumnIds()) { NActors::TLogContextGuard logGuard(NActors::TLogContextBuilder::Build()("field_name", resultSchema->GetIndexInfo().GetColumnName(columnId))); auto columnInfo = stats->GetColumnInfo(columnId); diff --git a/ydb/core/tx/columnshard/engines/scheme/column_features.h b/ydb/core/tx/columnshard/engines/scheme/column_features.h index d2f0b21b77..f12b146cad 100644 --- a/ydb/core/tx/columnshard/engines/scheme/column_features.h +++ b/ydb/core/tx/columnshard/engines/scheme/column_features.h @@ -124,7 +124,7 @@ struct TIndexInfo; class TColumnFeatures { private: - const ui32 ColumnId; + ui32 ColumnId; std::optional<NArrow::TCompression> Compression; std::optional<NArrow::NDictionary::TEncodingSettings> DictionaryEncoding; std::shared_ptr<TColumnLoader> Loader; diff --git a/ydb/core/tx/columnshard/engines/scheme/index_info.cpp b/ydb/core/tx/columnshard/engines/scheme/index_info.cpp index f47009ad91..0e492e596d 100644 --- a/ydb/core/tx/columnshard/engines/scheme/index_info.cpp +++ b/ydb/core/tx/columnshard/engines/scheme/index_info.cpp @@ -302,10 +302,9 @@ TColumnSaver TIndexInfo::GetColumnSaver(const ui32 columnId, const TSaverContext std::unique_ptr<arrow::util::Codec> columnCodec; { auto it = ColumnFeatures.find(columnId); - if (it != ColumnFeatures.end()) { - transformer = it->second.GetSaveTransformer(); - columnCodec = it->second.GetCompressionCodec(); - } + AFL_VERIFY(it != ColumnFeatures.end()); + transformer = it->second.GetSaveTransformer(); + columnCodec = it->second.GetCompressionCodec(); } if (context.GetExternalCompression()) { @@ -390,7 +389,9 @@ bool TIndexInfo::DeserializeFromProto(const NKikimrSchemeOp::TColumnTableSchema& AFL_ERROR(NKikimrServices::TX_COLUMNSHARD)("event", "cannot_parse_column_feature"); return false; } - ColumnFeatures.emplace(col.GetId(), *cFeatures); + auto it = ColumnFeatures.find(col.GetId()); + AFL_VERIFY(it != ColumnFeatures.end()); + it->second = *cFeatures; } for (const auto& keyName : schema.GetKeyColumnNames()) { |