ClickHouse/src/Interpreters/ClusterProxy/SelectStreamFactory.h

42 lines
911 B
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:
SelectStreamFactory(
const Block & header_,
QueryProcessingStage::Enum processed_stage_,
2021-07-15 16:15:16 +00:00
bool has_virtual_shard_num_column_);
2018-01-22 04:04:57 +00:00
void createForShard(
const Cluster::ShardInfo & shard_info,
const ASTPtr & query_ast,
2021-07-15 16:15:16 +00:00
const StorageID & main_table,
const ASTPtr & table_func_ptr,
ContextPtr context,
std::vector<QueryPlanPtr> & local_plans,
Shards & remote_shards,
UInt32 shard_count) override;
2016-01-28 01:00:27 +00:00
private:
const Block header;
QueryProcessingStage::Enum processed_stage;
2021-07-15 16:15:16 +00:00
bool has_virtual_shard_num_column = false;
2016-01-28 01:00:27 +00:00
};
}
}