Skip to content

Commit

Permalink
GH-5028 Reduce duplicate use of Unique plan node
Browse files Browse the repository at this point in the history
  • Loading branch information
hmottestad committed Jun 12, 2024
1 parent 79496bb commit 87caad7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public static PlanNode getInstance(PlanNode parent, boolean compress) {
if (parent.isGuaranteedEmpty()) {
return parent;
}

if (parent instanceof Unique && (!compress || ((Unique) parent).compress == compress)) {
return parent;
}

return new Unique(parent, compress);
}

Expand Down

0 comments on commit 87caad7

Please sign in to comment.