diff --git a/programs/compressor/CMakeLists.txt b/programs/compressor/CMakeLists.txt index 4ccf68c7af8..ff642a32fd4 100644 --- a/programs/compressor/CMakeLists.txt +++ b/programs/compressor/CMakeLists.txt @@ -5,7 +5,6 @@ set (CLICKHOUSE_COMPRESSOR_SOURCES Compressor.cpp) set (CLICKHOUSE_COMPRESSOR_LINK PRIVATE boost::program_options - clickhouse_dictionaries clickhouse_parsers dbms ) diff --git a/programs/copier/CMakeLists.txt b/programs/copier/CMakeLists.txt index dfb067b00f9..57e0996ed78 100644 --- a/programs/copier/CMakeLists.txt +++ b/programs/copier/CMakeLists.txt @@ -11,7 +11,6 @@ set (CLICKHOUSE_COPIER_LINK clickhouse_functions clickhouse_table_functions clickhouse_aggregate_functions - clickhouse_dictionaries string_utils PUBLIC diff --git a/programs/git-import/CMakeLists.txt b/programs/git-import/CMakeLists.txt index e84b41f2a54..279bb35a272 100644 --- a/programs/git-import/CMakeLists.txt +++ b/programs/git-import/CMakeLists.txt @@ -3,7 +3,6 @@ set (CLICKHOUSE_GIT_IMPORT_SOURCES git-import.cpp) set (CLICKHOUSE_GIT_IMPORT_LINK PRIVATE boost::program_options - clickhouse_dictionaries dbms ) diff --git a/programs/keeper-converter/CMakeLists.txt b/programs/keeper-converter/CMakeLists.txt index ebe433efb18..d529f94d388 100644 --- a/programs/keeper-converter/CMakeLists.txt +++ b/programs/keeper-converter/CMakeLists.txt @@ -3,7 +3,6 @@ set (CLICKHOUSE_KEEPER_CONVERTER_SOURCES KeeperConverter.cpp) set (CLICKHOUSE_KEEPER_CONVERTER_LINK PRIVATE boost::program_options - clickhouse_dictionaries dbms ) diff --git a/programs/keeper/CMakeLists.txt b/programs/keeper/CMakeLists.txt index 29a9ea4dd0e..5a50a7074d3 100644 --- a/programs/keeper/CMakeLists.txt +++ b/programs/keeper/CMakeLists.txt @@ -13,7 +13,6 @@ set (CLICKHOUSE_KEEPER_LINK clickhouse_common_config clickhouse_common_io clickhouse_common_zookeeper - clickhouse_dictionaries daemon dbms diff --git a/programs/library-bridge/CMakeLists.txt b/programs/library-bridge/CMakeLists.txt index a012bfcea83..0913c6e4a9a 100644 --- a/programs/library-bridge/CMakeLists.txt +++ b/programs/library-bridge/CMakeLists.txt @@ -15,7 +15,6 @@ endif () add_executable(clickhouse-library-bridge ${CLICKHOUSE_LIBRARY_BRIDGE_SOURCES}) target_link_libraries(clickhouse-library-bridge PRIVATE - clickhouse_dictionaries daemon dbms bridge diff --git a/programs/local/CMakeLists.txt b/programs/local/CMakeLists.txt index b61f0ea33b7..530128c2041 100644 --- a/programs/local/CMakeLists.txt +++ b/programs/local/CMakeLists.txt @@ -6,7 +6,6 @@ set (CLICKHOUSE_LOCAL_LINK clickhouse_aggregate_functions clickhouse_common_config clickhouse_common_io - clickhouse_dictionaries clickhouse_functions clickhouse_parsers clickhouse_storages_system diff --git a/programs/obfuscator/CMakeLists.txt b/programs/obfuscator/CMakeLists.txt index 8d0edc4bd8f..d1179b3718c 100644 --- a/programs/obfuscator/CMakeLists.txt +++ b/programs/obfuscator/CMakeLists.txt @@ -3,7 +3,6 @@ set (CLICKHOUSE_OBFUSCATOR_SOURCES Obfuscator.cpp) set (CLICKHOUSE_OBFUSCATOR_LINK PRIVATE boost::program_options - clickhouse_dictionaries dbms ) diff --git a/programs/odbc-bridge/CMakeLists.txt b/programs/odbc-bridge/CMakeLists.txt index e20cf5ccd93..7b232f2b5dc 100644 --- a/programs/odbc-bridge/CMakeLists.txt +++ b/programs/odbc-bridge/CMakeLists.txt @@ -25,7 +25,6 @@ target_link_libraries(clickhouse-odbc-bridge PRIVATE daemon dbms bridge - clickhouse_dictionaries clickhouse_parsers nanodbc unixodbc diff --git a/programs/server/CMakeLists.txt b/programs/server/CMakeLists.txt index 739d1004025..281c25d50eb 100644 --- a/programs/server/CMakeLists.txt +++ b/programs/server/CMakeLists.txt @@ -13,7 +13,6 @@ set (CLICKHOUSE_SERVER_LINK clickhouse_common_config clickhouse_common_io clickhouse_common_zookeeper - clickhouse_dictionaries clickhouse_functions clickhouse_parsers clickhouse_storages_system diff --git a/src/Bridge/LibraryBridgeHelper.cpp b/src/Bridge/LibraryBridgeHelper.cpp index 023dc4ed15b..b13be0aba29 100644 --- a/src/Bridge/LibraryBridgeHelper.cpp +++ b/src/Bridge/LibraryBridgeHelper.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/src/DataStreams/formatBlock.cpp b/src/DataStreams/formatBlock.cpp new file mode 100644 index 00000000000..e38540256ac --- /dev/null +++ b/src/DataStreams/formatBlock.cpp @@ -0,0 +1,15 @@ +#include +#include +#include + +namespace DB +{ +void formatBlock(BlockOutputStreamPtr & out, const Block & block) +{ + out->writePrefix(); + out->write(block); + out->writeSuffix(); + out->flush(); +} + +} diff --git a/src/DataStreams/formatBlock.h b/src/DataStreams/formatBlock.h new file mode 100644 index 00000000000..939b72682c3 --- /dev/null +++ b/src/DataStreams/formatBlock.h @@ -0,0 +1,9 @@ +#pragma once + +#include + +namespace DB +{ +void formatBlock(BlockOutputStreamPtr & out, const Block & block); + +} diff --git a/src/Dictionaries/DictionarySourceHelpers.cpp b/src/Dictionaries/DictionarySourceHelpers.cpp index 2d53ac4321e..54ed07092d3 100644 --- a/src/Dictionaries/DictionarySourceHelpers.cpp +++ b/src/Dictionaries/DictionarySourceHelpers.cpp @@ -1,7 +1,7 @@ #include "DictionarySourceHelpers.h" #include #include -#include +#include #include #include #include "DictionaryStructure.h" @@ -18,14 +18,6 @@ namespace ErrorCodes extern const int SIZES_OF_COLUMNS_DOESNT_MATCH; } -void formatBlock(BlockOutputStreamPtr & out, const Block & block) -{ - out->writePrefix(); - out->write(block); - out->writeSuffix(); - out->flush(); -} - /// For simple key Block blockForIds( diff --git a/src/Dictionaries/DictionarySourceHelpers.h b/src/Dictionaries/DictionarySourceHelpers.h index 6c9a321aa36..6fed4c7181c 100644 --- a/src/Dictionaries/DictionarySourceHelpers.h +++ b/src/Dictionaries/DictionarySourceHelpers.h @@ -13,15 +13,8 @@ namespace DB { -class IBlockOutputStream; -using BlockOutputStreamPtr = std::shared_ptr; - struct DictionaryStructure; -/// Write keys to block output stream. - -void formatBlock(BlockOutputStreamPtr & out, const Block & block); - /// For simple key Block blockForIds( diff --git a/src/Dictionaries/ExecutableDictionarySource.cpp b/src/Dictionaries/ExecutableDictionarySource.cpp index 7f4a3a5b45f..daf79965428 100644 --- a/src/Dictionaries/ExecutableDictionarySource.cpp +++ b/src/Dictionaries/ExecutableDictionarySource.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Dictionaries/ExecutablePoolDictionarySource.cpp b/src/Dictionaries/ExecutablePoolDictionarySource.cpp index 5ece5af0f0b..9eacda343cf 100644 --- a/src/Dictionaries/ExecutablePoolDictionarySource.cpp +++ b/src/Dictionaries/ExecutablePoolDictionarySource.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Dictionaries/HTTPDictionarySource.cpp b/src/Dictionaries/HTTPDictionarySource.cpp index b1b1968454c..ea26e9b7a2a 100644 --- a/src/Dictionaries/HTTPDictionarySource.cpp +++ b/src/Dictionaries/HTTPDictionarySource.cpp @@ -1,6 +1,7 @@ #include "HTTPDictionarySource.h" #include #include +#include #include #include #include