ClickHouse/src/Processors/QueryPlan/UnionStep.h
2021-09-14 19:28:41 +03:00

29 lines
774 B
C++

#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.
explicit UnionStep(DataStreams input_streams_, size_t max_threads_ = 0);
String getName() const override { return "Union"; }
QueryPipelineBuilderPtr updatePipeline(QueryPipelineBuilders pipelines, const BuildQueryPipelineSettings &) override;
void describePipeline(FormatSettings & settings) const override;
size_t getMaxThreads() const { return max_threads; }
private:
Block header;
size_t max_threads;
Processors processors;
};
}