Skip to content

Commit 9b35c0e

Browse files
spuchinSergey Puchin
and
Sergey Puchin
authored
Add QueryService coverage for kqp_perf_ut.(KIKIMR-16294) (#721)
Co-authored-by: Sergey Puchin <[email protected]>
1 parent a9a47fa commit 9b35c0e

File tree

3 files changed

+213
-310
lines changed

3 files changed

+213
-310
lines changed

ydb/core/kqp/ut/common/kqp_ut_common.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,9 @@ void PrintQueryStats(const TDataQueryResult& result) {
542542
}
543543
}
544544

545-
void AssertTableStats(const TDataQueryResult& result, TStringBuf table, const TExpectedTableStats& expectedStats) {
546-
auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
547-
545+
void AssertTableStats(const Ydb::TableStats::QueryStats& stats, TStringBuf table,
546+
const TExpectedTableStats& expectedStats)
547+
{
548548
ui64 actualReads = 0;
549549
ui64 actualUpdates = 0;
550550
ui64 actualDeletes = 0;
@@ -575,6 +575,11 @@ void AssertTableStats(const TDataQueryResult& result, TStringBuf table, const TE
575575
}
576576
}
577577

578+
void AssertTableStats(const TDataQueryResult& result, TStringBuf table, const TExpectedTableStats& expectedStats) {
579+
auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
580+
return AssertTableStats(stats, table, expectedStats);
581+
}
582+
578583
TDataQueryResult ExecQueryAndTestResult(TSession& session, const TString& query, const NYdb::TParams& params,
579584
const TString& expectedYson)
580585
{

ydb/core/kqp/ut/common/kqp_ut_common.h

+6
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ struct TExpectedTableStats {
268268
TMaybe<ui64> ExpectedDeletes;
269269
};
270270

271+
void AssertTableStats(const Ydb::TableStats::QueryStats& stats, TStringBuf table,
272+
const TExpectedTableStats& expectedStats);
273+
274+
void AssertTableStats(const NYdb::NTable::TDataQueryResult& result, TStringBuf table,
275+
const TExpectedTableStats& expectedStats);
276+
271277
void AssertTableStats(const NYdb::NTable::TDataQueryResult& result, TStringBuf table,
272278
const TExpectedTableStats& expectedStats);
273279

0 commit comments

Comments
 (0)