ClickHouse/src/Processors/QueryPlan/CreatingSetsStep.h

55 lines
1.5 KiB
C++
Raw Normal View History

2020-06-17 15:50:21 +00:00
#pragma once
2020-06-17 15:50:21 +00:00
#include <Processors/QueryPlan/ITransformingStep.h>
2021-10-15 20:18:20 +00:00
#include <QueryPipeline/SizeLimits.h>
#include <Interpreters/Context_fwd.h>
2022-07-18 15:53:30 +00:00
#include <Interpreters/PreparedSets.h>
2020-06-17 15:50:21 +00:00
namespace DB
{
/// Creates sets for subqueries and JOIN. See CreatingSetsTransform.
class CreatingSetStep : public ITransformingStep, WithContext
2020-06-17 15:50:21 +00:00
{
public:
2020-09-15 13:25:14 +00:00
CreatingSetStep(
2020-06-17 15:50:21 +00:00
const DataStream & input_stream_,
2020-09-15 13:25:14 +00:00
String description_,
SubqueryForSet subquery_for_set_,
2020-06-17 15:50:21 +00:00
SizeLimits network_transfer_limits_,
ContextPtr context_);
2020-06-17 15:50:21 +00:00
2020-09-15 17:13:13 +00:00
String getName() const override { return "CreatingSet"; }
2020-06-17 15:50:21 +00:00
void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override;
2020-06-17 15:50:21 +00:00
void describeActions(JSONBuilder::JSONMap & map) const override;
2020-06-27 14:02:24 +00:00
void describeActions(FormatSettings & settings) const override;
2020-06-24 12:09:01 +00:00
2020-06-17 15:50:21 +00:00
private:
void updateOutputStream() override;
2020-09-15 13:25:14 +00:00
String description;
SubqueryForSet subquery_for_set;
2020-06-17 15:50:21 +00:00
SizeLimits network_transfer_limits;
};
2020-09-15 13:25:14 +00:00
class CreatingSetsStep : public IQueryPlanStep
{
public:
2021-03-04 17:38:12 +00:00
explicit CreatingSetsStep(DataStreams input_streams_);
2020-09-15 13:25:14 +00:00
String getName() const override { return "CreatingSets"; }
QueryPipelineBuilderPtr updatePipeline(QueryPipelineBuilders pipelines, const BuildQueryPipelineSettings &) override;
2020-09-15 13:25:14 +00:00
void describePipeline(FormatSettings & settings) const override;
private:
Processors processors;
};
void addCreatingSetsStep(QueryPlan & query_plan, PreparedSetsPtr prepared_sets, ContextPtr context);
2020-09-15 17:13:13 +00:00
2020-06-17 15:50:21 +00:00
}