From 2fe033d00e7050e1320038faf444e41138503b03 Mon Sep 17 00:00:00 2001 From: proller Date: Tue, 17 Jan 2017 18:03:32 +0000 Subject: [PATCH 1/2] Fix compiling in freebsd/clang --- dbms/include/DB/IO/ReadBufferFromFileBase.h | 1 + dbms/include/DB/Interpreters/AggregationCommon.h | 2 +- dbms/include/DB/Parsers/IAST.h | 1 + dbms/include/DB/Storages/MergeTree/MergeSelector.h | 2 ++ dbms/src/Dictionaries/MongoDBBlockInputStream.cpp | 11 +++++++---- dbms/src/Functions/FunctionsArray.cpp | 3 +++ 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/dbms/include/DB/IO/ReadBufferFromFileBase.h b/dbms/include/DB/IO/ReadBufferFromFileBase.h index b18ef15f18e..c3b3df48d2d 100644 --- a/dbms/include/DB/IO/ReadBufferFromFileBase.h +++ b/dbms/include/DB/IO/ReadBufferFromFileBase.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include diff --git a/dbms/include/DB/Interpreters/AggregationCommon.h b/dbms/include/DB/Interpreters/AggregationCommon.h index 92f35184cc7..04ec89c2d61 100644 --- a/dbms/include/DB/Interpreters/AggregationCommon.h +++ b/dbms/include/DB/Interpreters/AggregationCommon.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/dbms/include/DB/Parsers/IAST.h b/dbms/include/DB/Parsers/IAST.h index 8722b94ff17..796c275deda 100644 --- a/dbms/include/DB/Parsers/IAST.h +++ b/dbms/include/DB/Parsers/IAST.h @@ -2,6 +2,7 @@ #include #include +#include #include #include diff --git a/dbms/include/DB/Storages/MergeTree/MergeSelector.h b/dbms/include/DB/Storages/MergeTree/MergeSelector.h index 50d5fcb0041..b360a84fa60 100644 --- a/dbms/include/DB/Storages/MergeTree/MergeSelector.h +++ b/dbms/include/DB/Storages/MergeTree/MergeSelector.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -57,3 +58,4 @@ public: }; } + \ No newline at end of file diff --git a/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp b/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp index fee41ad2261..88a48837e4f 100644 --- a/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp +++ b/dbms/src/Dictionaries/MongoDBBlockInputStream.cpp @@ -1,3 +1,7 @@ +#include +#include +#include + #include #include #include @@ -10,8 +14,6 @@ #include #include #include -#include -#include #include @@ -34,8 +36,9 @@ MongoDBBlockInputStream::~MongoDBBlockInputStream() = default; String MongoDBBlockInputStream::getID() const { - using stream = std::ostringstream; - return "MongoDB(@" + static_cast(stream{} << cursor.get()).str() + ")"; + std::ostringstream stream; + stream << cursor.get(); + return "MongoDB(@" + stream.str() + ")"; } diff --git a/dbms/src/Functions/FunctionsArray.cpp b/dbms/src/Functions/FunctionsArray.cpp index 9cab5dcbba6..3d16462fa7a 100644 --- a/dbms/src/Functions/FunctionsArray.cpp +++ b/dbms/src/Functions/FunctionsArray.cpp @@ -1,6 +1,9 @@ #include #include +#include +#include + namespace DB { From 0fc364165f721731c0587debbb9d3f24dec996e0 Mon Sep 17 00:00:00 2001 From: proller Date: Tue, 17 Jan 2017 19:00:24 +0000 Subject: [PATCH 2/2] fix space --- dbms/include/DB/Storages/MergeTree/MergeSelector.h | 1 - 1 file changed, 1 deletion(-) diff --git a/dbms/include/DB/Storages/MergeTree/MergeSelector.h b/dbms/include/DB/Storages/MergeTree/MergeSelector.h index b360a84fa60..7f44d99feb2 100644 --- a/dbms/include/DB/Storages/MergeTree/MergeSelector.h +++ b/dbms/include/DB/Storages/MergeTree/MergeSelector.h @@ -58,4 +58,3 @@ public: }; } - \ No newline at end of file