ClickHouse/src/Interpreters/ClusterProxy/SelectStreamFactory.h

58 lines
1.5 KiB
C++
Raw Normal View History

2016-01-28 01:00:27 +00:00
#pragma once
#include <Core/QueryProcessingStage.h>
#include <Interpreters/ClusterProxy/IStreamFactory.h>
#include <Interpreters/StorageID.h>
#include <Storages/IStorage_fwd.h>
2016-01-28 01:00:27 +00:00
namespace DB
{
namespace ClusterProxy
{
class SelectStreamFactory final : public IStreamFactory
2016-01-28 01:00:27 +00:00
{
public:
2018-07-25 12:31:47 +00:00
/// Database in a query.
SelectStreamFactory(
const Block & header_,
QueryProcessingStage::Enum processed_stage_,
2020-03-04 20:29:52 +00:00
StorageID main_table_,
2019-10-19 20:36:35 +00:00
const Scalars & scalars_,
bool has_virtual_shard_num_column_,
2018-01-22 04:04:57 +00:00
const Tables & external_tables);
2018-07-27 21:33:30 +00:00
2018-07-25 12:31:47 +00:00
/// TableFunction in a query.
SelectStreamFactory(
const Block & header_,
QueryProcessingStage::Enum processed_stage_,
ASTPtr table_func_ptr_,
2019-10-19 20:36:35 +00:00
const Scalars & scalars_,
bool has_virtual_shard_num_column_,
const Tables & external_tables_);
2018-01-22 04:04:57 +00:00
void createForShard(
const Cluster::ShardInfo & shard_info,
const String & query, const ASTPtr & query_ast,
ContextPtr context, const ThrottlerPtr & throttler,
const SelectQueryInfo & query_info,
2020-09-25 13:19:26 +00:00
std::vector<QueryPlanPtr> & plans,
Pipes & remote_pipes,
Pipes & delayed_pipes,
Poco::Logger * log) override;
2016-01-28 01:00:27 +00:00
private:
const Block header;
QueryProcessingStage::Enum processed_stage;
2020-03-04 20:29:52 +00:00
StorageID main_table = StorageID::createEmpty();
ASTPtr table_func_ptr;
2019-10-19 20:36:35 +00:00
Scalars scalars;
bool has_virtual_shard_num_column = false;
2018-02-21 04:14:03 +00:00
Tables external_tables;
2016-01-28 01:00:27 +00:00
};
}
}