#pragma once #include #include #include namespace DB { using DictionaryConfigurationPtr = Poco::AutoPtr; /// 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 getInfoIfClickHouseDictionarySource(DictionaryConfigurationPtr & config, ContextPtr global_context); }