2016-01-28 01:00:27 +00:00
|
|
|
#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;
|
2016-10-04 14:42:41 +00:00
|
|
|
BlockInputStreamPtr createRemote(ConnectionPoolPtr & pool, const std::string & query,
|
2016-01-28 01:00:27 +00:00
|
|
|
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;
|
2016-03-28 13:00:00 +00:00
|
|
|
PoolMode getPoolMode() const override;
|
2016-01-28 01:00:27 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
const QueryProcessingStage::Enum & processed_stage;
|
|
|
|
const Tables & external_tables;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|