mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 11:52:27 +00:00
28 lines
852 B
C++
28 lines
852 B
C++
#pragma once
|
|
|
|
#include <Poco/Util/AbstractConfiguration.h>
|
|
#include <Parsers/ASTCreateQuery.h>
|
|
#include <Interpreters/Context_fwd.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
using DictionaryConfigurationPtr = Poco::AutoPtr<Poco::Util::AbstractConfiguration>;
|
|
|
|
/// Convert dictionary AST to Poco::AbstractConfiguration
|
|
/// This function is necessary because all loadable objects configuration are Poco::AbstractConfiguration
|
|
/// Can throw exception if query is ill-formed
|
|
DictionaryConfigurationPtr
|
|
getDictionaryConfigurationFromAST(const ASTCreateQuery & query, ContextPtr context, const std::string & database_ = "");
|
|
|
|
struct ClickHouseDictionarySourceInfo
|
|
{
|
|
QualifiedTableName table_name;
|
|
bool is_local = false;
|
|
};
|
|
|
|
std::optional<ClickHouseDictionarySourceInfo>
|
|
getInfoIfClickHouseDictionarySource(DictionaryConfigurationPtr & config, ContextPtr global_context);
|
|
|
|
}
|