mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
31 lines
808 B
C++
31 lines
808 B
C++
#pragma once
|
|
#include <Processors/QueryPlan/ITransformingStep.h>
|
|
#include <QueryPipeline/SizeLimits.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Executes OFFSET (without LIMIT). See OffsetTransform.
|
|
class OffsetStep : public ITransformingStep
|
|
{
|
|
public:
|
|
OffsetStep(const DataStream & input_stream_, size_t offset_);
|
|
|
|
String getName() const override { return "Offset"; }
|
|
|
|
void transformPipeline(QueryPipelineBuilder & pipeline, const BuildQueryPipelineSettings &) override;
|
|
|
|
void describeActions(JSONBuilder::JSONMap & map) const override;
|
|
void describeActions(FormatSettings & settings) const override;
|
|
|
|
private:
|
|
void updateOutputStream() override
|
|
{
|
|
output_stream = createOutputStream(input_streams.front(), input_streams.front().header, getDataStreamTraits());
|
|
}
|
|
|
|
size_t offset;
|
|
};
|
|
|
|
}
|