Skip to content

Commit

Permalink
[CALCITE-6665] Code Review
Browse files Browse the repository at this point in the history
  • Loading branch information
NobiGo committed Dec 19, 2024
1 parent 0f46436 commit b85b5b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/org/apache/calcite/tools/RelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -2679,6 +2679,8 @@ private boolean alreadyUnique(List<AggCallPlus> aggCallList,
List<RexNode> extraNodes) {
final RelMetadataQuery mq = peek().getCluster().getMetadataQuery();
if (aggCallList.isEmpty() && groupSet.isEmpty()) {
// We can't remove "GROUP BY ()" if there's a chance the rel could be
// empty.
if (RelMdUtil.isRelDefinitelyEmpty(mq, peek())) {
return false;
}
Expand Down

0 comments on commit b85b5b4

Please sign in to comment.