mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32: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
|
set (CLICKHOUSE_COMPRESSOR_LINK
|
||||||
PRIVATE
|
PRIVATE
|
||||||
boost::program_options
|
boost::program_options
|
||||||
clickhouse_dictionaries
|
|
||||||
clickhouse_parsers
|
clickhouse_parsers
|
||||||
dbms
|
dbms
|
||||||
)
|
)
|
||||||
|
@ -11,7 +11,6 @@ set (CLICKHOUSE_COPIER_LINK
|
|||||||
clickhouse_functions
|
clickhouse_functions
|
||||||
clickhouse_table_functions
|
clickhouse_table_functions
|
||||||
clickhouse_aggregate_functions
|
clickhouse_aggregate_functions
|
||||||
clickhouse_dictionaries
|
|
||||||
string_utils
|
string_utils
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
@ -3,7 +3,6 @@ set (CLICKHOUSE_GIT_IMPORT_SOURCES git-import.cpp)
|
|||||||
set (CLICKHOUSE_GIT_IMPORT_LINK
|
set (CLICKHOUSE_GIT_IMPORT_LINK
|
||||||
PRIVATE
|
PRIVATE
|
||||||
boost::program_options
|
boost::program_options
|
||||||
clickhouse_dictionaries
|
|
||||||
dbms
|
dbms
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ set (CLICKHOUSE_KEEPER_CONVERTER_SOURCES KeeperConverter.cpp)
|
|||||||
set (CLICKHOUSE_KEEPER_CONVERTER_LINK
|
set (CLICKHOUSE_KEEPER_CONVERTER_LINK
|
||||||
PRIVATE
|
PRIVATE
|
||||||
boost::program_options
|
boost::program_options
|
||||||
clickhouse_dictionaries
|
|
||||||
dbms
|
dbms
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ set (CLICKHOUSE_KEEPER_LINK
|
|||||||
clickhouse_common_config
|
clickhouse_common_config
|
||||||
clickhouse_common_io
|
clickhouse_common_io
|
||||||
clickhouse_common_zookeeper
|
clickhouse_common_zookeeper
|
||||||
clickhouse_dictionaries
|
|
||||||
daemon
|
daemon
|
||||||
dbms
|
dbms
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ endif ()
|
|||||||
add_executable(clickhouse-library-bridge ${CLICKHOUSE_LIBRARY_BRIDGE_SOURCES})
|
add_executable(clickhouse-library-bridge ${CLICKHOUSE_LIBRARY_BRIDGE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(clickhouse-library-bridge PRIVATE
|
target_link_libraries(clickhouse-library-bridge PRIVATE
|
||||||
clickhouse_dictionaries
|
|
||||||
daemon
|
daemon
|
||||||
dbms
|
dbms
|
||||||
bridge
|
bridge
|
||||||
|
@ -6,7 +6,6 @@ set (CLICKHOUSE_LOCAL_LINK
|
|||||||
clickhouse_aggregate_functions
|
clickhouse_aggregate_functions
|
||||||
clickhouse_common_config
|
clickhouse_common_config
|
||||||
clickhouse_common_io
|
clickhouse_common_io
|
||||||
clickhouse_dictionaries
|
|
||||||
clickhouse_functions
|
clickhouse_functions
|
||||||
clickhouse_parsers
|
clickhouse_parsers
|
||||||
clickhouse_storages_system
|
clickhouse_storages_system
|
||||||
|
@ -3,7 +3,6 @@ set (CLICKHOUSE_OBFUSCATOR_SOURCES Obfuscator.cpp)
|
|||||||
set (CLICKHOUSE_OBFUSCATOR_LINK
|
set (CLICKHOUSE_OBFUSCATOR_LINK
|
||||||
PRIVATE
|
PRIVATE
|
||||||
boost::program_options
|
boost::program_options
|
||||||
clickhouse_dictionaries
|
|
||||||
dbms
|
dbms
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ target_link_libraries(clickhouse-odbc-bridge PRIVATE
|
|||||||
daemon
|
daemon
|
||||||
dbms
|
dbms
|
||||||
bridge
|
bridge
|
||||||
clickhouse_dictionaries
|
|
||||||
clickhouse_parsers
|
clickhouse_parsers
|
||||||
nanodbc
|
nanodbc
|
||||||
unixodbc
|
unixodbc
|
||||||
|
@ -13,7 +13,6 @@ set (CLICKHOUSE_SERVER_LINK
|
|||||||
clickhouse_common_config
|
clickhouse_common_config
|
||||||
clickhouse_common_io
|
clickhouse_common_io
|
||||||
clickhouse_common_zookeeper
|
clickhouse_common_zookeeper
|
||||||
clickhouse_dictionaries
|
|
||||||
clickhouse_functions
|
clickhouse_functions
|
||||||
clickhouse_parsers
|
clickhouse_parsers
|
||||||
clickhouse_storages_system
|
clickhouse_storages_system
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <IO/ReadHelpers.h>
|
#include <IO/ReadHelpers.h>
|
||||||
#include <DataStreams/OneBlockInputStream.h>
|
#include <DataStreams/OneBlockInputStream.h>
|
||||||
#include <DataStreams/OwningBlockInputStream.h>
|
#include <DataStreams/OwningBlockInputStream.h>
|
||||||
|
#include <DataStreams/formatBlock.h>
|
||||||
#include <Dictionaries/DictionarySourceHelpers.h>
|
#include <Dictionaries/DictionarySourceHelpers.h>
|
||||||
#include <Processors/Formats/InputStreamFromInputFormat.h>
|
#include <Processors/Formats/InputStreamFromInputFormat.h>
|
||||||
#include <IO/WriteBufferFromOStream.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 "DictionarySourceHelpers.h"
|
||||||
#include <Columns/ColumnsNumber.h>
|
#include <Columns/ColumnsNumber.h>
|
||||||
#include <Core/ColumnWithTypeAndName.h>
|
#include <Core/ColumnWithTypeAndName.h>
|
||||||
#include <DataStreams/IBlockOutputStream.h>
|
#include <DataStreams/IBlockStream_fwd.h>
|
||||||
#include <DataTypes/DataTypesNumber.h>
|
#include <DataTypes/DataTypesNumber.h>
|
||||||
#include <IO/WriteHelpers.h>
|
#include <IO/WriteHelpers.h>
|
||||||
#include "DictionaryStructure.h"
|
#include "DictionaryStructure.h"
|
||||||
@ -18,14 +18,6 @@ namespace ErrorCodes
|
|||||||
extern const int SIZES_OF_COLUMNS_DOESNT_MATCH;
|
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
|
/// For simple key
|
||||||
|
|
||||||
Block blockForIds(
|
Block blockForIds(
|
||||||
|
@ -13,15 +13,8 @@
|
|||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
class IBlockOutputStream;
|
|
||||||
using BlockOutputStreamPtr = std::shared_ptr<IBlockOutputStream>;
|
|
||||||
|
|
||||||
struct DictionaryStructure;
|
struct DictionaryStructure;
|
||||||
|
|
||||||
/// Write keys to block output stream.
|
|
||||||
|
|
||||||
void formatBlock(BlockOutputStreamPtr & out, const Block & block);
|
|
||||||
|
|
||||||
/// For simple key
|
/// For simple key
|
||||||
|
|
||||||
Block blockForIds(
|
Block blockForIds(
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <common/scope_guard.h>
|
#include <common/scope_guard.h>
|
||||||
#include <DataStreams/IBlockOutputStream.h>
|
#include <DataStreams/IBlockOutputStream.h>
|
||||||
#include <DataStreams/OwningBlockInputStream.h>
|
#include <DataStreams/OwningBlockInputStream.h>
|
||||||
|
#include <DataStreams/formatBlock.h>
|
||||||
#include <Interpreters/Context.h>
|
#include <Interpreters/Context.h>
|
||||||
#include <IO/WriteHelpers.h>
|
#include <IO/WriteHelpers.h>
|
||||||
#include <IO/ReadHelpers.h>
|
#include <IO/ReadHelpers.h>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <common/scope_guard.h>
|
#include <common/scope_guard.h>
|
||||||
#include <DataStreams/IBlockOutputStream.h>
|
#include <DataStreams/IBlockOutputStream.h>
|
||||||
|
#include <DataStreams/formatBlock.h>
|
||||||
#include <Interpreters/Context.h>
|
#include <Interpreters/Context.h>
|
||||||
#include <IO/WriteHelpers.h>
|
#include <IO/WriteHelpers.h>
|
||||||
#include <IO/ReadHelpers.h>
|
#include <IO/ReadHelpers.h>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "HTTPDictionarySource.h"
|
#include "HTTPDictionarySource.h"
|
||||||
#include <DataStreams/IBlockOutputStream.h>
|
#include <DataStreams/IBlockOutputStream.h>
|
||||||
#include <DataStreams/OwningBlockInputStream.h>
|
#include <DataStreams/OwningBlockInputStream.h>
|
||||||
|
#include <DataStreams/formatBlock.h>
|
||||||
#include <IO/ConnectionTimeouts.h>
|
#include <IO/ConnectionTimeouts.h>
|
||||||
#include <IO/ConnectionTimeoutsContext.h>
|
#include <IO/ConnectionTimeoutsContext.h>
|
||||||
#include <IO/ReadWriteBufferFromHTTP.h>
|
#include <IO/ReadWriteBufferFromHTTP.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user