#pragma once #include #include namespace DB { class IntersectOrExceptStep : public IQueryPlanStep { public: using Operator = ASTSelectIntersectExceptQuery::Operator; /// max_threads is used to limit the number of threads for result pipeline. IntersectOrExceptStep(Headers input_headers_, Operator operator_, size_t max_threads_ = 0); String getName() const override { return "IntersectOrExcept"; } QueryPipelineBuilderPtr updatePipeline(QueryPipelineBuilders pipelines, const BuildQueryPipelineSettings & settings) override; void describePipeline(FormatSettings & settings) const override; private: void updateOutputHeader() override; Operator current_operator; size_t max_threads; }; }