Skip to content

Commit

Permalink
Add QueryService coverage for kqp_perf_ut.(KIKIMR-16294)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Puchin committed Dec 26, 2023
1 parent d4ad98f commit 3025cd0
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 310 deletions.
11 changes: 8 additions & 3 deletions ydb/core/kqp/ut/common/kqp_ut_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ void PrintQueryStats(const TDataQueryResult& result) {
}
}

void AssertTableStats(const TDataQueryResult& result, TStringBuf table, const TExpectedTableStats& expectedStats) {
auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());

void AssertTableStats(const Ydb::TableStats::QueryStats& stats, TStringBuf table,
const TExpectedTableStats& expectedStats)
{
ui64 actualReads = 0;
ui64 actualUpdates = 0;
ui64 actualDeletes = 0;
Expand Down Expand Up @@ -575,6 +575,11 @@ void AssertTableStats(const TDataQueryResult& result, TStringBuf table, const TE
}
}

void AssertTableStats(const TDataQueryResult& result, TStringBuf table, const TExpectedTableStats& expectedStats) {
auto stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
return AssertTableStats(stats, table, expectedStats);
}

TDataQueryResult ExecQueryAndTestResult(TSession& session, const TString& query, const NYdb::TParams& params,
const TString& expectedYson)
{
Expand Down
6 changes: 6 additions & 0 deletions ydb/core/kqp/ut/common/kqp_ut_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@ struct TExpectedTableStats {
TMaybe<ui64> ExpectedDeletes;
};

void AssertTableStats(const Ydb::TableStats::QueryStats& stats, TStringBuf table,
const TExpectedTableStats& expectedStats);

void AssertTableStats(const NYdb::NTable::TDataQueryResult& result, TStringBuf table,
const TExpectedTableStats& expectedStats);

void AssertTableStats(const NYdb::NTable::TDataQueryResult& result, TStringBuf table,
const TExpectedTableStats& expectedStats);

Expand Down
Loading

0 comments on commit 3025cd0

Please sign in to comment.