Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
kryonix committed Mar 21, 2024
1 parent 65f2197 commit 2d0dd6b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/execution/physical_plan/plan_limit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalLimit &op)
omit_projection = false;
break;
}
if (order_by.projections.empty() || omit_projection)
{
if (order_by.projections.empty() || omit_projection) {
idx_t offset_val = 0;
if (op.offset_val.Type() == LimitNodeType::CONSTANT_VALUE) {
offset_val = op.offset_val.GetConstantValue();
}
auto top_n = make_uniq<PhysicalTopN>(order_by.children[0]->types, std::move(order_by.orders), op.limit_val.GetConstantValue(),
offset_val, op.estimated_cardinality);
auto top_n = make_uniq<PhysicalTopN>(order_by.children[0]->types, std::move(order_by.orders),
op.limit_val.GetConstantValue(), offset_val, op.estimated_cardinality);
top_n->children.push_back(std::move(order_by.children[0]));
return std::move(top_n);
}
Expand Down

0 comments on commit 2d0dd6b

Please sign in to comment.