Skip to content

Commit 5a17a28

Browse files
committed
fix kqp/ut/olap build
1 parent 56294df commit 5a17a28

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

Diff for: ydb/core/kqp/ut/olap/blobs_sharing_ut.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Y_UNIT_TEST_SUITE(KqpOlapBlobsSharing) {
8383
TTypedLocalHelper Helper;
8484
NYDBTest::TControllers::TGuard<NYDBTest::NColumnShard::TController> Controller;
8585
std::vector<ui64> ShardIds;
86-
std::vector<ui64> PathIds;
86+
std::vector<NColumnShard::TInternalPathId> PathIds;
8787
YDB_ACCESSOR(bool, RebootTablet, false);
8888
public:
8989
const TTypedLocalHelper& GetHelper() const {
@@ -109,12 +109,12 @@ Y_UNIT_TEST_SUITE(KqpOlapBlobsSharing) {
109109
Helper.CreateTestOlapTable(ShardsCount, ShardsCount);
110110
ShardIds = Controller->GetShardActualIds();
111111
AFL_VERIFY(ShardIds.size() == ShardsCount)("count", ShardIds.size())("ids", JoinSeq(",", ShardIds));
112-
std::set<ui64> pathIdsSet;
112+
std::set<NColumnShard::TInternalPathId> pathIdsSet;
113113
for (auto&& i : ShardIds) {
114114
auto pathIds = Controller->GetPathIds(i);
115115
pathIdsSet.insert(pathIds.begin(), pathIds.end());
116116
}
117-
PathIds = std::vector<ui64>(pathIdsSet.begin(), pathIdsSet.end());
117+
PathIds = std::vector<NColumnShard::TInternalPathId>(pathIdsSet.begin(), pathIdsSet.end());
118118
AFL_VERIFY(PathIds.size() == 1)("count", PathIds.size())("ids", JoinSeq(",", PathIds));
119119
}
120120

@@ -140,13 +140,13 @@ Y_UNIT_TEST_SUITE(KqpOlapBlobsSharing) {
140140
AFL_VERIFY(i < ShardIds.size());
141141
sources.emplace_back(ShardIds[i]);
142142
}
143-
std::set<ui64> pathIds;
143+
std::set<NColumnShard::TInternalPathId> pathIds;
144144
for (auto&& i : pathIdxs) {
145145
AFL_VERIFY(i < PathIds.size());
146146
AFL_VERIFY(pathIds.emplace(PathIds[i]).second);
147147
}
148148
Cerr << "SHARING: " << JoinSeq(",", sources) << "->" << destination << Endl;
149-
THashMap<ui64, ui64> pathIdsRemap;
149+
THashMap<NColumnShard::TInternalPathId, NColumnShard::TInternalPathId> pathIdsRemap;
150150
for (auto&& i : pathIds) {
151151
pathIdsRemap.emplace(i, i);
152152
}

Diff for: ydb/core/kqp/ut/olap/indexes_ut.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) {
245245
TAutoPtr<IEventHandle> handle;
246246

247247
size_t shard = 0;
248-
std::set<ui64> pathids;
248+
std::set<NColumnShard::TInternalPathId> pathids;
249249
for (auto&& i : csController->GetShardActualIds()) {
250250
Cerr << ">>> shard actual id: " << i << Endl;
251251
for (auto&& j : csController->GetPathIds(i)) {
@@ -258,12 +258,12 @@ Y_UNIT_TEST_SUITE(KqpOlapIndexes) {
258258
}
259259

260260
UNIT_ASSERT(pathids.size() == 1);
261-
ui64 pathId = *pathids.begin();
261+
auto pathId = *pathids.begin();
262262

263263
shard = 0;
264264
for (auto&& i : csController->GetShardActualIds()) {
265265
auto request = std::make_unique<NStat::TEvStatistics::TEvStatisticsRequest>();
266-
request->Record.MutableTable()->MutablePathId()->SetLocalId(pathId);
266+
request->Record.MutableTable()->MutablePathId()->SetLocalId(pathId.GetInternalPathIdValue());
267267

268268
runtime->Send(MakePipePerNodeCacheID(false), sender, new TEvPipeCache::TEvForward(request.release(), i, false));
269269
if (++shard == 3) {

Diff for: ydb/core/kqp/ut/olap/tiering_ut.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,15 @@ Y_UNIT_TEST_SUITE(KqpOlapTiering) {
306306
olapHelper.CreateTestOlapTable();
307307
tieringHelper.WriteSampleData();
308308
csController->WaitCompactions(TDuration::Seconds(5));
309-
310-
csController->RegisterLock("table", std::make_shared<NOlap::NDataLocks::TListTablesLock>("table", THashSet<ui64>({0, 1, 2, 3, 4, 5}), NOlap::NDataLocks::ELockCategory::Compaction));
309+
THashSet<NColumnShard::TInternalPathId> pathsToLock{
310+
NColumnShard::TInternalPathId::FromInternalPathIdValue(0),
311+
NColumnShard::TInternalPathId::FromInternalPathIdValue(1),
312+
NColumnShard::TInternalPathId::FromInternalPathIdValue(2),
313+
NColumnShard::TInternalPathId::FromInternalPathIdValue(3),
314+
NColumnShard::TInternalPathId::FromInternalPathIdValue(4),
315+
NColumnShard::TInternalPathId::FromInternalPathIdValue(5),
316+
};
317+
csController->RegisterLock("table", std::make_shared<NOlap::NDataLocks::TListTablesLock>("table", std::move(pathsToLock), NOlap::NDataLocks::ELockCategory::Compaction));
311318
{
312319
const TString query = R"(ALTER TABLE `/Root/olapStore/olapTable` SET TTL Interval("PT1S") ON timestamp)";
313320
auto result = testHelper.GetSession().ExecuteSchemeQuery(query).GetValueSync();

0 commit comments

Comments
 (0)