ClickHouse/src/Dictionaries/DictionarySourceHelpers.h

48 lines
1.1 KiB
C++
Raw Normal View History

2017-05-25 19:21:57 +00:00
#pragma once
#include <vector>
#include <common/types.h>
#include <Poco/File.h>
#include <Poco/Util/AbstractConfiguration.h>
2017-05-25 19:21:57 +00:00
#include <Columns/IColumn.h>
#include <Core/Block.h>
2017-05-25 19:21:57 +00:00
namespace DB
{
class IBlockOutputStream;
using BlockOutputStreamPtr = std::shared_ptr<IBlockOutputStream>;
struct DictionaryStructure;
class Context;
2017-05-25 19:21:57 +00:00
/// Write keys to block output stream.
void formatWithBlock(BlockOutputStreamPtr & out, Block block);
2017-05-25 19:21:57 +00:00
/// For simple key
Block blockForIds(const std::vector<UInt64> & ids);
2017-05-25 19:21:57 +00:00
/// For composite key
Block blockForKeys(
const DictionaryStructure & dict_struct,
const Columns & key_columns,
const std::vector<size_t> & requested_rows);
2017-05-25 19:21:57 +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,
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
}