Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felixwluo committed Aug 14, 2024
1 parent e8da090 commit d56caa4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1830,9 +1830,9 @@ public PlanFragment visitPhysicalLimit(PhysicalLimit<? extends Plan> physicalLim
PlanFragment inputFragment = physicalLimit.child(0).accept(this, context);
PlanNode child = inputFragment.getPlanRoot();

if (!(inputFragment.getPlanRoot() instanceof ExchangeNode)) {
inputFragment.getPlanRoot().setLimit(physicalLimit.getLimit());
inputFragment.getPlanRoot().setOffset(physicalLimit.getOffset());
if (!(child instanceof ExchangeNode)) {
child.setLimit(physicalLimit.getLimit());
child.setOffset(physicalLimit.getOffset());
return inputFragment;
} else {
child.setLimit(MergeLimits.mergeLimit(physicalLimit.getLimit(), physicalLimit.getOffset(),
Expand Down

0 comments on commit d56caa4

Please sign in to comment.