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