2016-01-28 01:00:27 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Core/QueryProcessingStage.h>
|
2019-05-17 14:34:25 +00:00
|
|
|
#include <Interpreters/ClusterProxy/IStreamFactory.h>
|
2020-05-20 20:16:32 +00:00
|
|
|
#include <Interpreters/StorageID.h>
|
2019-05-17 14:34:25 +00:00
|
|
|
#include <Storages/IStorage_fwd.h>
|
2016-01-28 01:00:27 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
namespace ClusterProxy
|
|
|
|
{
|
|
|
|
|
2017-07-28 12:58:24 +00:00
|
|
|
class SelectStreamFactory final : public IStreamFactory
|
2016-01-28 01:00:27 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-07-28 12:58:24 +00:00
|
|
|
SelectStreamFactory(
|
2018-07-24 13:10:34 +00:00
|
|
|
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,
|
2021-03-07 15:51:01 +00:00
|
|
|
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,
|
2021-07-31 07:45:26 +00:00
|
|
|
Shards & remote_shards,
|
|
|
|
UInt32 shard_count) override;
|
2016-01-28 01:00:27 +00:00
|
|
|
|
|
|
|
private:
|
2018-02-15 18:54:12 +00:00
|
|
|
const Block header;
|
2017-04-17 16:16:04 +00:00
|
|
|
QueryProcessingStage::Enum processed_stage;
|
2021-07-15 16:15:16 +00:00
|
|
|
|
2019-09-18 21:17:00 +00:00
|
|
|
bool has_virtual_shard_num_column = false;
|
2016-01-28 01:00:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|