You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "suibianwanwank (via GitHub)" <gi...@apache.org> on 2025/06/04 14:18:11 UTC
Re: [PR] [CALCITE-7010] The well-known count bug [calcite]
suibianwanwank commented on code in PR #4375:
URL: https://github.com/apache/calcite/pull/4375#discussion_r2126726488
##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -759,6 +758,68 @@ protected RexNode removeCorrelationExpr(
}
RelNode newRel = relBuilder.build();
+ // Special case where the group by is static (i.e., a select clause with aggregation functions
Review Comment:
Actually, this isn't exactly the same:
```
select sum(i0) from (select i0 from test where i1 = 1) a
sum |
----+
null|
(1 rows)
```
```
select sum(i0) from (select i0 from test where i1 = 1) a group by true
sum|
---+
(0 rows)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org