Skip to content
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