#pragma once #include #include namespace DB { class IJoin; using JoinPtr = std::shared_ptr; /// Join two data streams. class JoinStep : public IQueryPlanStep { public: JoinStep( const DataStream & left_stream_, const DataStream & right_stream_, JoinPtr join_, size_t max_block_size_); String getName() const override { return "Join"; } QueryPipelineBuilderPtr updatePipeline(QueryPipelineBuilders pipelines, const BuildQueryPipelineSettings &) override; void describePipeline(FormatSettings & settings) const override; const JoinPtr & getJoin() const { return join; } private: JoinPtr join; size_t max_block_size; Processors processors; }; /// Special step for the case when Join is already filled. /// For StorageJoin and Dictionary. class FilledJoinStep : public ITransformingStep { public: FilledJoinStep(const DataStream & input_stream_, JoinPtr join_, size_t max_block_size_); String getName() const override { return "FilledJoin"; } void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override; private: JoinPtr join; size_t max_block_size; }; }