mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
33 lines
989 B
C++
33 lines
989 B
C++
#pragma once
|
|
|
|
#include <DB/Interpreters/ClusterProxy/IQueryConstructor.h>
|
|
#include <DB/Core/QueryProcessingStage.h>
|
|
#include <DB/Storages/IStorage.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
namespace ClusterProxy
|
|
{
|
|
|
|
class SelectQueryConstructor final : public IQueryConstructor
|
|
{
|
|
public:
|
|
SelectQueryConstructor(const QueryProcessingStage::Enum & processed_stage, const Tables & external_tables);
|
|
|
|
BlockInputStreamPtr createLocal(ASTPtr query_ast, const Context & context, const Cluster::Address & address) override;
|
|
BlockInputStreamPtr createRemote(IConnectionPool * pool, const std::string & query,
|
|
const Settings & settings, ThrottlerPtr throttler, const Context & context) override;
|
|
BlockInputStreamPtr createRemote(ConnectionPoolsPtr & pools, const std::string & query,
|
|
const Settings & settings, ThrottlerPtr throttler, const Context & context) override;
|
|
bool localAndRemote() const override;
|
|
|
|
private:
|
|
const QueryProcessingStage::Enum & processed_stage;
|
|
const Tables & external_tables;
|
|
};
|
|
|
|
}
|
|
|
|
}
|