#pragma once #include 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; }; }