2017-05-25 19:21:57 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <Columns/IColumn.h>
|
2020-03-19 10:38:34 +00:00
|
|
|
#include <common/types.h>
|
2020-04-03 21:32:06 +00:00
|
|
|
#include <Poco/File.h>
|
|
|
|
#include <Poco/Util/AbstractConfiguration.h>
|
2017-05-25 19:21:57 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
class IBlockOutputStream;
|
|
|
|
using BlockOutputStreamPtr = std::shared_ptr<IBlockOutputStream>;
|
|
|
|
|
|
|
|
struct DictionaryStructure;
|
2020-04-03 21:32:06 +00:00
|
|
|
class Context;
|
|
|
|
|
2017-05-25 19:21:57 +00:00
|
|
|
/// Write keys to block output stream.
|
|
|
|
|
|
|
|
/// For simple key
|
|
|
|
void formatIDs(BlockOutputStreamPtr & out, const std::vector<UInt64> & ids);
|
|
|
|
|
|
|
|
/// For composite key
|
2018-12-10 15:25:45 +00:00
|
|
|
void formatKeys(
|
|
|
|
const DictionaryStructure & dict_struct,
|
|
|
|
BlockOutputStreamPtr & out,
|
|
|
|
const Columns & key_columns,
|
|
|
|
const std::vector<size_t> & requested_rows);
|
2017-05-25 19:21:57 +00:00
|
|
|
|
2020-04-03 21:32:06 +00:00
|
|
|
/// Used for applying settings to copied context in some register[...]Source functions
|
|
|
|
Context copyContextAndApplySettings(
|
2020-04-09 20:52:53 +00:00
|
|
|
const std::string & config_prefix,
|
|
|
|
const Context & context,
|
2020-04-03 21:32:06 +00:00
|
|
|
const Poco::Util::AbstractConfiguration & config);
|
|
|
|
|
2020-04-17 19:54:53 +00:00
|
|
|
void applySettingsToContext(
|
|
|
|
const std::string & config_prefix,
|
|
|
|
Context & context,
|
|
|
|
const Poco::Util::AbstractConfiguration & config);
|
2017-05-25 19:21:57 +00:00
|
|
|
}
|