mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Add FillingStep
This commit is contained in:
parent
7fcea660de
commit
d795b2b037
@ -92,6 +92,7 @@
|
||||
#include <Processors/QueryPlan/TotalsHavingStep.h>
|
||||
#include <Processors/QueryPlan/RollupStep.h>
|
||||
#include <Processors/QueryPlan/CubeStep.h>
|
||||
#include <Processors/QueryPlan/FillingStep.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -1788,10 +1789,8 @@ void InterpreterSelectQuery::executeWithFill(QueryPipeline & pipeline)
|
||||
if (fill_descr.empty())
|
||||
return;
|
||||
|
||||
pipeline.addSimpleTransform([&](const Block & header)
|
||||
{
|
||||
return std::make_shared<FillingTransform>(header, fill_descr);
|
||||
});
|
||||
FillingStep filling_step(DataStream{.header = pipeline.getHeader()}, std::move(fill_descr));
|
||||
filling_step.transformPipeline(pipeline);
|
||||
}
|
||||
}
|
||||
|
||||
|
22
src/Processors/QueryPlan/FillingStep.cpp
Normal file
22
src/Processors/QueryPlan/FillingStep.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include <Processors/QueryPlan/FillingStep.h>
|
||||
#include <Processors/Transforms/FillingTransform.h>
|
||||
#include <Processors/QueryPipeline.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
FillingStep::FillingStep(const DataStream & input_stream_, SortDescription sort_description_)
|
||||
: ITransformingStep(input_stream_, input_stream_)
|
||||
, sort_description(std::move(sort_description_))
|
||||
{
|
||||
}
|
||||
|
||||
void FillingStep::transformPipeline(QueryPipeline & pipeline)
|
||||
{
|
||||
pipeline.addSimpleTransform([&](const Block & header)
|
||||
{
|
||||
return std::make_shared<FillingTransform>(header, sort_description);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
21
src/Processors/QueryPlan/FillingStep.h
Normal file
21
src/Processors/QueryPlan/FillingStep.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include <Processors/QueryPlan/ITransformingStep.h>
|
||||
#include <Core/SortDescription.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
class FillingStep : public ITransformingStep
|
||||
{
|
||||
public:
|
||||
FillingStep(const DataStream & input_stream_, SortDescription sort_description_);
|
||||
|
||||
String getName() const override { return "Filling"; }
|
||||
|
||||
void transformPipeline(QueryPipeline & pipeline) override;
|
||||
|
||||
private:
|
||||
SortDescription sort_description;
|
||||
};
|
||||
|
||||
}
|
@ -143,6 +143,7 @@ SRCS(
|
||||
QueryPlan/CubeStep.cpp
|
||||
QueryPlan/DistinctStep.cpp
|
||||
QueryPlan/ExpressionStep.cpp
|
||||
QueryPlan/FillingStep.cpp
|
||||
QueryPlan/FilterStep.cpp
|
||||
QueryPlan/ISourceStep.cpp
|
||||
QueryPlan/ITransformingStep.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user