Skip to content

Commit 6814405

Browse files
fix test withno appdata (#991)
* fix test withno appdata * fix test build * fix test build
1 parent dcdedf9 commit 6814405

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

ydb/core/tx/columnshard/engines/changes/general_compaction.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ TConclusionStatus TGeneralCompactColumnEngineChanges::DoConstructBlobs(TConstruc
222222
NChanges::TGeneralCompactionCounters::OnPortionsKind(insertedPortionsSize, compactedPortionsSize, otherPortionsSize);
223223
NChanges::TGeneralCompactionCounters::OnRepackPortions(portionsCount, portionsSize);
224224

225-
if (AppDataVerified().ColumnShardConfig.GetUseChunkedMergeOnCompaction()) {
225+
if (!HasAppData() || AppDataVerified().ColumnShardConfig.GetUseChunkedMergeOnCompaction()) {
226226
BuildAppendedPortionsByChunks(context);
227227
} else {
228228
BuildAppendedPortionsByFullBatches(context);

ydb/core/tx/columnshard/engines/ut_insert_table.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ class TTestInsertTableDB : public IDbWrapper {
2727
return true;
2828
}
2929

30-
void WriteColumn(ui32, const TPortionInfo&, const TColumnRecord&) override {}
31-
void EraseColumn(ui32, const TPortionInfo&, const TColumnRecord&) override {}
32-
bool LoadColumns(ui32, const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>&) override { return true; }
30+
void WriteColumn(const TPortionInfo&, const TColumnRecord&) override {}
31+
void EraseColumn(const TPortionInfo&, const TColumnRecord&) override {}
32+
bool LoadColumns(const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>&) override { return true; }
3333

34-
void WriteCounter(ui32, ui32, ui64) override {}
35-
bool LoadCounters(ui32, const std::function<void(ui32 id, ui64 value)>&) override { return true; }
34+
void WriteCounter(ui32, ui64) override {}
35+
bool LoadCounters(const std::function<void(ui32 id, ui64 value)>&) override { return true; }
3636
};
3737

3838
}

ydb/core/tx/columnshard/engines/ut_logs_engine.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ class TTestDbWrapper : public IDbWrapper {
6969
return true;
7070
}
7171

72-
void WriteColumn(ui32 index, const TPortionInfo& portion, const TColumnRecord& row) override {
72+
void WriteColumn(const TPortionInfo& portion, const TColumnRecord& row) override {
7373
auto proto = portion.GetMeta().SerializeToProto(row.ColumnId, row.Chunk);
7474
auto rowProto = row.GetMeta().SerializeToProto();
7575
if (proto) {
7676
*rowProto.MutablePortionMeta() = std::move(*proto);
7777
}
7878

79-
auto& data = Indices[index].Columns[portion.GetPathId()];
79+
auto& data = Indices[0].Columns[portion.GetPathId()];
8080
NOlap::TColumnChunkLoadContext loadContext(row.GetAddress(), row.BlobRange, rowProto);
8181
auto itInsertInfo = LoadContexts[portion.GetAddress()].emplace(row.GetAddress(), loadContext);
8282
if (!itInsertInfo.second) {
@@ -104,8 +104,8 @@ class TTestDbWrapper : public IDbWrapper {
104104
}
105105
}
106106

107-
void EraseColumn(ui32 index, const TPortionInfo& portion, const TColumnRecord& row) override {
108-
auto& data = Indices[index].Columns[portion.GetPathId()];
107+
void EraseColumn(const TPortionInfo& portion, const TColumnRecord& row) override {
108+
auto& data = Indices[0].Columns[portion.GetPathId()];
109109
auto it = data.find(portion.GetPortion());
110110
Y_ABORT_UNLESS(it != data.end());
111111
auto& portionLocal = it->second;
@@ -119,8 +119,8 @@ class TTestDbWrapper : public IDbWrapper {
119119
portionLocal.Records.swap(filtered);
120120
}
121121

122-
bool LoadColumns(ui32 index, const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>& callback) override {
123-
auto& columns = Indices[index].Columns;
122+
bool LoadColumns(const std::function<void(const TPortionInfo&, const TColumnChunkLoadContext&)>& callback) override {
123+
auto& columns = Indices[0].Columns;
124124
for (auto& [pathId, portions] : columns) {
125125
for (auto& [portionId, portionLocal] : portions) {
126126
auto copy = portionLocal;
@@ -137,13 +137,13 @@ class TTestDbWrapper : public IDbWrapper {
137137
return true;
138138
}
139139

140-
void WriteCounter(ui32 index, ui32 counterId, ui64 value) override {
141-
auto& counters = Indices[index].Counters;
140+
void WriteCounter(ui32 counterId, ui64 value) override {
141+
auto& counters = Indices[0].Counters;
142142
counters[counterId] = value;
143143
}
144144

145-
bool LoadCounters(ui32 index, const std::function<void(ui32 id, ui64 value)>& callback) override {
146-
auto& counters = Indices[index].Counters;
145+
bool LoadCounters(const std::function<void(ui32 id, ui64 value)>& callback) override {
146+
auto& counters = Indices[0].Counters;
147147
for (auto& [id, value] : counters) {
148148
callback(id, value);
149149
}

0 commit comments

Comments
 (0)