2021-04-27 17:30:33 +00:00
|
|
|
#include <Processors/QueryPlan/IQueryPlanStep.h>
|
2021-04-28 17:32:12 +00:00
|
|
|
#include <Processors/QueryPlan/ITransformingStep.h>
|
2021-04-27 17:30:33 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class IJoin;
|
|
|
|
using JoinPtr = std::shared_ptr<IJoin>;
|
|
|
|
|
|
|
|
/// TODO: add separate step for join.
|
|
|
|
class JoinStep : public IQueryPlanStep
|
|
|
|
{
|
|
|
|
public:
|
2021-04-28 17:32:12 +00:00
|
|
|
JoinStep(
|
2021-04-27 17:30:33 +00:00
|
|
|
const DataStream & left_stream_,
|
|
|
|
const DataStream & right_stream_,
|
|
|
|
JoinPtr join_,
|
|
|
|
size_t max_block_size_);
|
|
|
|
|
|
|
|
String getName() const override { return "Join"; }
|
|
|
|
|
2021-04-28 17:32:12 +00:00
|
|
|
QueryPipelinePtr updatePipeline(QueryPipelines pipelines, const BuildQueryPipelineSettings &) override;
|
|
|
|
|
|
|
|
void describePipeline(FormatSettings & settings) const override;
|
2021-04-27 17:30:33 +00:00
|
|
|
|
|
|
|
const JoinPtr & getJoin() const { return join; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
JoinPtr join;
|
2021-04-28 17:32:12 +00:00
|
|
|
size_t max_block_size;
|
|
|
|
Processors processors;
|
|
|
|
};
|
|
|
|
|
2021-04-29 09:08:49 +00:00
|
|
|
class FilledJoinStep : public ITransformingStep
|
2021-04-28 17:32:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-04-29 09:08:49 +00:00
|
|
|
FilledJoinStep(const DataStream & input_stream_, JoinPtr join_, size_t max_block_size_);
|
2021-04-28 17:32:12 +00:00
|
|
|
|
2021-04-29 09:08:49 +00:00
|
|
|
String getName() const override { return "FilledJoin"; }
|
2021-04-28 17:32:12 +00:00
|
|
|
void transformPipeline(QueryPipeline & pipeline, const BuildQueryPipelineSettings &) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
JoinPtr join;
|
2021-04-27 17:30:33 +00:00
|
|
|
size_t max_block_size;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|