1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/execution/operator/helper/physical_limit.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/execution/physical_operator.hpp"
12
13namespace duckdb {
14
15//! PhyisicalLimit represents the LIMIT operator
16class PhysicalLimit : public PhysicalOperator {
17public:
18 PhysicalLimit(LogicalOperator &op, idx_t limit, idx_t offset)
19 : PhysicalOperator(PhysicalOperatorType::LIMIT, op.types), limit(limit), offset(offset) {
20 }
21
22 idx_t limit;
23 idx_t offset;
24
25public:
26 void GetChunkInternal(ClientContext &context, DataChunk &chunk, PhysicalOperatorState *state) override;
27
28 unique_ptr<PhysicalOperatorState> GetOperatorState() override;
29};
30
31} // namespace duckdb
32