mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
32 lines
853 B
C++
32 lines
853 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; }
|
|
|
|
bool canUpdateInputStream() const override { return true; }
|
|
|
|
private:
|
|
void updateOutputStream() override;
|
|
|
|
Block header;
|
|
size_t max_threads;
|
|
};
|
|
|
|
}
|