#pragma once #include #include #include #include namespace DB { struct Settings; class Context; class Cluster; class Throttler; namespace ClusterProxy { class IQueryConstructor { public: virtual ~IQueryConstructor() {} virtual BlockInputStreamPtr createLocal(ASTPtr query_ast, const Context & context, const Cluster::Address & address) = 0; virtual BlockInputStreamPtr createRemote(IConnectionPool * pool, const std::string & query, const Settings & settings, ThrottlerPtr throttler, const Context & context) = 0; virtual BlockInputStreamPtr createRemote(ConnectionPoolsPtr & pools, const std::string & query, const Settings & new_settings, ThrottlerPtr throttler, const Context & context) = 0; virtual bool localAndRemote() const = 0; }; } }