ClickHouse/src/Processors/QueryPlan/WindowStep.h

38 lines
995 B
C++
Raw Normal View History

2020-12-10 22:16:58 +00:00
#pragma once
#include <Processors/QueryPlan/ITransformingStep.h>
2021-01-30 01:16:44 +00:00
#include <Interpreters/WindowDescription.h>
2020-12-15 00:36:03 +00:00
2020-12-10 22:16:58 +00:00
namespace DB
{
class ActionsDAG;
using ActionsDAGPtr = std::shared_ptr<ActionsDAG>;
class WindowTransform;
class WindowStep : public ITransformingStep
{
public:
2020-12-15 00:36:03 +00:00
explicit WindowStep(const DataStream & input_stream_,
const WindowDescription & window_description_,
const std::vector<WindowFunctionDescription> & window_functions_);
2020-12-18 17:13:28 +00:00
String getName() const override { return "Window"; }
2020-12-10 22:16:58 +00:00
void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override;
2020-12-10 22:16:58 +00:00
void describeActions(JSONBuilder::JSONMap & map) const override;
2020-12-24 09:09:35 +00:00
void describeActions(FormatSettings & settings) const override;
2020-12-10 22:16:58 +00:00
const WindowDescription & getWindowDescription() const;
2021-11-02 15:40:37 +00:00
2020-12-10 22:16:58 +00:00
private:
void updateOutputStream() override;
2020-12-15 00:36:03 +00:00
WindowDescription window_description;
std::vector<WindowFunctionDescription> window_functions;
2020-12-10 22:16:58 +00:00
};
}