ClickHouse/src/Processors/QueryPlan/UnionStep.h

29 lines
760 B
C++
Raw Normal View History

#pragma once
#include <Processors/QueryPlan/IQueryPlanStep.h>
namespace DB
{
/// Unite several logical streams of data into single logical stream with specified structure.
class UnionStep : public IQueryPlanStep
{
public:
/// max_threads is used to limit the number of threads for result pipeline.
2021-03-25 09:57:14 +00:00
explicit UnionStep(DataStreams input_streams_, size_t max_threads_ = 0);
String getName() const override { return "Union"; }
2021-03-25 09:57:14 +00:00
QueryPipelinePtr updatePipeline(QueryPipelines pipelines, const BuildQueryPipelineSettings &) override;
2020-06-25 09:39:17 +00:00
void describePipeline(FormatSettings & settings) const override;
size_t getMaxThreads() const { return max_threads; }
private:
Block header;
size_t max_threads;
2020-06-25 09:39:17 +00:00
Processors processors;
};
}