Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add QueryService coverage for kqp_perf_ut.(KIKIMR-16294) #721

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading