1#include "duckdb/execution/operator/helper/physical_limit_percent.hpp"
2#include "duckdb/execution/physical_plan_generator.hpp"
3#include "duckdb/planner/operator/logical_limit_percent.hpp"
4
5namespace duckdb {
6
7unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalLimitPercent &op) {
8 D_ASSERT(op.children.size() == 1);
9
10 auto plan = CreatePlan(op&: *op.children[0]);
11
12 auto limit = make_uniq<PhysicalLimitPercent>(args&: op.types, args&: op.limit_percent, args&: op.offset_val, args: std::move(op.limit),
13 args: std::move(op.offset), args&: op.estimated_cardinality);
14 limit->children.push_back(x: std::move(plan));
15 return std::move(limit);
16}
17
18} // namespace duckdb
19