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
1 change: 1 addition & 0 deletions clickhouse/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct QuerySettingsField {
{
IMPORTANT = 0x01,
CUSTOM = 0x02,
OBSOLETE = 0x04,
};
std::string value;
uint64_t flags{0};
Expand Down
19 changes: 19 additions & 0 deletions ut/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,25 @@ std::ostream & operator<<(std::ostream & ostr, const ServerInfo & server_info) {
<< " (" << server_info.revision << ")";
}

std::ostream & operator<<(std::ostream & ostr, const Profile & profile) {
return ostr
<< "rows : " << profile.rows
<< " blocks : " << profile.blocks
<< " bytes : " << profile.bytes
<< " rows_before_limit : " << profile.rows_before_limit
<< " applied_limit : " << profile.applied_limit
<< " calculated_rows_before_limit : " << profile.calculated_rows_before_limit;
}

std::ostream & operator<<(std::ostream & ostr, const Progress & progress) {
return ostr
<< "rows : " << progress.rows
<< " bytes : " << progress.bytes
<< " total_rows : " << progress.total_rows
<< " written_rows : " << progress.written_rows
<< " written_bytes : " << progress.written_bytes;
}

}

uint64_t versionNumber(const ServerInfo & server_info) {
Expand Down
6 changes: 6 additions & 0 deletions ut/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <clickhouse/base/platform.h>
#include <clickhouse/base/uuid.h>

#include "clickhouse/query.h"
#include "utils_meta.h"
#include "utils_comparison.h"

Expand All @@ -24,6 +25,9 @@ namespace clickhouse {
class Block;
class Type;
struct ServerInfo;
struct Profile;
struct QuerySettingsField;
struct Progress;
}

template <typename ResultType = std::string>
Expand Down Expand Up @@ -136,6 +140,8 @@ namespace clickhouse {
std::ostream& operator<<(std::ostream & ostr, const Block & block);
std::ostream& operator<<(std::ostream & ostr, const Type & type);
std::ostream & operator<<(std::ostream & ostr, const ServerInfo & server_info);
std::ostream & operator<<(std::ostream & ostr, const Profile & profile);
std::ostream & operator<<(std::ostream & ostr, const Progress & progress);
}

std::ostream& operator<<(std::ostream & ostr, const PrettyPrintBlock & block);
Expand Down