Skip to content

Commit 4179250

Browse files
authored
Merge pull request #299 from Enmk/fix_windows_build
Fix Windows build
2 parents b820830 + 50a3817 commit 4179250

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

clickhouse/query.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ struct QuerySettingsField {
1919
{
2020
IMPORTANT = 0x01,
2121
CUSTOM = 0x02,
22+
OBSOLETE = 0x04,
2223
};
2324
std::string value;
2425
uint64_t flags{0};

ut/utils.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,25 @@ std::ostream & operator<<(std::ostream & ostr, const ServerInfo & server_info) {
310310
<< " (" << server_info.revision << ")";
311311
}
312312

313+
std::ostream & operator<<(std::ostream & ostr, const Profile & profile) {
314+
return ostr
315+
<< "rows : " << profile.rows
316+
<< " blocks : " << profile.blocks
317+
<< " bytes : " << profile.bytes
318+
<< " rows_before_limit : " << profile.rows_before_limit
319+
<< " applied_limit : " << profile.applied_limit
320+
<< " calculated_rows_before_limit : " << profile.calculated_rows_before_limit;
321+
}
322+
323+
std::ostream & operator<<(std::ostream & ostr, const Progress & progress) {
324+
return ostr
325+
<< "rows : " << progress.rows
326+
<< " bytes : " << progress.bytes
327+
<< " total_rows : " << progress.total_rows
328+
<< " written_rows : " << progress.written_rows
329+
<< " written_bytes : " << progress.written_bytes;
330+
}
331+
313332
}
314333

315334
uint64_t versionNumber(const ServerInfo & server_info) {

ut/utils.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <clickhouse/base/platform.h>
44
#include <clickhouse/base/uuid.h>
55

6+
#include "clickhouse/query.h"
67
#include "utils_meta.h"
78
#include "utils_comparison.h"
89

@@ -24,6 +25,9 @@ namespace clickhouse {
2425
class Block;
2526
class Type;
2627
struct ServerInfo;
28+
struct Profile;
29+
struct QuerySettingsField;
30+
struct Progress;
2731
}
2832

2933
template <typename ResultType = std::string>
@@ -136,6 +140,8 @@ namespace clickhouse {
136140
std::ostream& operator<<(std::ostream & ostr, const Block & block);
137141
std::ostream& operator<<(std::ostream & ostr, const Type & type);
138142
std::ostream & operator<<(std::ostream & ostr, const ServerInfo & server_info);
143+
std::ostream & operator<<(std::ostream & ostr, const Profile & profile);
144+
std::ostream & operator<<(std::ostream & ostr, const Progress & progress);
139145
}
140146

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

0 commit comments

Comments
 (0)