Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwener committed Jan 11, 2024
1 parent 3aa1b94 commit 744b241
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class AddOffsetIntoDistribute extends PlanPostProcessor {
@Override
public Plan visitPhysicalLimit(PhysicalLimit<? extends Plan> limit, CascadesContext context) {
if (limit.getPhase().isLocal() || limit.getOffset() == 0) {
return null;
return limit;
}

return new PhysicalDistribute<>(DistributionSpecGather.INSTANCE,
Expand All @@ -43,7 +43,7 @@ public Plan visitPhysicalLimit(PhysicalLimit<? extends Plan> limit, CascadesCont
@Override
public Plan visitPhysicalTopN(PhysicalTopN<? extends Plan> topN, CascadesContext context) {
if (topN.getSortPhase().isLocal() || topN.getOffset() == 0) {
return null;
return topN;
}

return new PhysicalDistribute<>(DistributionSpecGather.INSTANCE,
Expand Down

0 comments on commit 744b241

Please sign in to comment.