mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Move formatBlock to its own file
This commit is contained in:
parent
5c39fd5f08
commit
34b0bb6b7f
@ -5,7 +5,6 @@ set (CLICKHOUSE_COMPRESSOR_SOURCES Compressor.cpp)
|
||||
set (CLICKHOUSE_COMPRESSOR_LINK
|
||||
PRIVATE
|
||||
boost::program_options
|
||||
clickhouse_dictionaries
|
||||
clickhouse_parsers
|
||||
dbms
|
||||
)
|
||||
|
@ -11,7 +11,6 @@ set (CLICKHOUSE_COPIER_LINK
|
||||
clickhouse_functions
|
||||
clickhouse_table_functions
|
||||
clickhouse_aggregate_functions
|
||||
clickhouse_dictionaries
|
||||
string_utils
|
||||
|
||||
PUBLIC
|
||||
|
@ -3,7 +3,6 @@ set (CLICKHOUSE_GIT_IMPORT_SOURCES git-import.cpp)
|
||||
set (CLICKHOUSE_GIT_IMPORT_LINK
|
||||
PRIVATE
|
||||
boost::program_options
|
||||
clickhouse_dictionaries
|
||||
dbms
|
||||
)
|
||||
|
||||
|
@ -3,7 +3,6 @@ set (CLICKHOUSE_KEEPER_CONVERTER_SOURCES KeeperConverter.cpp)
|
||||
set (CLICKHOUSE_KEEPER_CONVERTER_LINK
|
||||
PRIVATE
|
||||
boost::program_options
|
||||
clickhouse_dictionaries
|
||||
dbms
|
||||
)
|
||||
|
||||
|
@ -13,7 +13,6 @@ set (CLICKHOUSE_KEEPER_LINK
|
||||
clickhouse_common_config
|
||||
clickhouse_common_io
|
||||
clickhouse_common_zookeeper
|
||||
clickhouse_dictionaries
|
||||
daemon
|
||||
dbms
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -3,7 +3,6 @@ set (CLICKHOUSE_OBFUSCATOR_SOURCES Obfuscator.cpp)
|
||||
set (CLICKHOUSE_OBFUSCATOR_LINK
|
||||
PRIVATE
|
||||
boost::program_options
|
||||
clickhouse_dictionaries
|
||||
dbms
|
||||
)
|
||||
|
||||
|
@ -25,7 +25,6 @@ target_link_libraries(clickhouse-odbc-bridge PRIVATE
|
||||
daemon
|
||||
dbms
|
||||
bridge
|
||||
clickhouse_dictionaries
|
||||
clickhouse_parsers
|
||||
nanodbc
|
||||
unixodbc
|
||||
|
@ -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
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <IO/ReadHelpers.h>
|
||||
#include <DataStreams/OneBlockInputStream.h>
|
||||
#include <DataStreams/OwningBlockInputStream.h>
|
||||
#include <DataStreams/formatBlock.h>
|
||||
#include <Dictionaries/DictionarySourceHelpers.h>
|
||||
#include <Processors/Formats/InputStreamFromInputFormat.h>
|
||||
#include <IO/WriteBufferFromOStream.h>
|
||||
|
15
src/DataStreams/formatBlock.cpp
Normal file
15
src/DataStreams/formatBlock.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include <Core/Block.h>
|
||||
#include <DataStreams/IBlockOutputStream.h>
|
||||
#include <DataStreams/formatBlock.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
void formatBlock(BlockOutputStreamPtr & out, const Block & block)
|
||||
{
|
||||
out->writePrefix();
|
||||
out->write(block);
|
||||
out->writeSuffix();
|
||||
out->flush();
|
||||
}
|
||||
|
||||
}
|
9
src/DataStreams/formatBlock.h
Normal file
9
src/DataStreams/formatBlock.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <DataStreams/IBlockStream_fwd.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
void formatBlock(BlockOutputStreamPtr & out, const Block & block);
|
||||
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
#include "DictionarySourceHelpers.h"
|
||||
#include <Columns/ColumnsNumber.h>
|
||||
#include <Core/ColumnWithTypeAndName.h>
|
||||
#include <DataStreams/IBlockOutputStream.h>
|
||||
#include <DataStreams/IBlockStream_fwd.h>
|
||||
#include <DataTypes/DataTypesNumber.h>
|
||||
#include <IO/WriteHelpers.h>
|
||||
#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(
|
||||
|
@ -13,15 +13,8 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
class IBlockOutputStream;
|
||||
using BlockOutputStreamPtr = std::shared_ptr<IBlockOutputStream>;
|
||||
|
||||
struct DictionaryStructure;
|
||||
|
||||
/// Write keys to block output stream.
|
||||
|
||||
void formatBlock(BlockOutputStreamPtr & out, const Block & block);
|
||||
|
||||
/// For simple key
|
||||
|
||||
Block blockForIds(
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <common/scope_guard.h>
|
||||
#include <DataStreams/IBlockOutputStream.h>
|
||||
#include <DataStreams/OwningBlockInputStream.h>
|
||||
#include <DataStreams/formatBlock.h>
|
||||
#include <Interpreters/Context.h>
|
||||
#include <IO/WriteHelpers.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <functional>
|
||||
#include <common/scope_guard.h>
|
||||
#include <DataStreams/IBlockOutputStream.h>
|
||||
#include <DataStreams/formatBlock.h>
|
||||
#include <Interpreters/Context.h>
|
||||
#include <IO/WriteHelpers.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "HTTPDictionarySource.h"
|
||||
#include <DataStreams/IBlockOutputStream.h>
|
||||
#include <DataStreams/OwningBlockInputStream.h>
|
||||
#include <DataStreams/formatBlock.h>
|
||||
#include <IO/ConnectionTimeouts.h>
|
||||
#include <IO/ConnectionTimeoutsContext.h>
|
||||
#include <IO/ReadWriteBufferFromHTTP.h>
|
||||
|
Loading…
Reference in New Issue
Block a user