Skip to content

Commit

Permalink
Remove redundant check
Browse files Browse the repository at this point in the history
Grouping keys are always part of output symbols
  • Loading branch information
sopel39 committed Oct 16, 2024
1 parent 77aca72 commit bf536a8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import io.trino.sql.planner.Symbol;
import io.trino.type.FunctionType;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Expand Down Expand Up @@ -233,8 +232,7 @@ public boolean producesDistinctRows()
{
return aggregations.isEmpty() &&
!groupingSets.getGroupingKeys().isEmpty() &&
outputs.size() == groupingSets.getGroupingKeys().size() &&
new HashSet<>(outputs).containsAll(groupingSets.getGroupingKeys());
outputs.size() == groupingSets.getGroupingKeys().size();
}

public boolean isDecomposable(Session session, Metadata metadata)
Expand Down

0 comments on commit bf536a8

Please sign in to comment.